Project

General

Profile

Bug #4480

Abort when deleting autorec via HTTP API

Added by Dave Pickles over 7 years ago. Updated over 7 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Start date:
2017-07-09
Due date:
% Done:

100%

Estimated time:
Found in version:
4.2.3
Affected Versions:

Description

TVH aborts if I try to delete a 'Series Link' autorec (with no pending timers) using the HTTP API eg:
curl http://user:[email protected]:9981/api/dvr/entry/cancel?uuid=3c2cad4db51c1c6c5a368cfb877af538

The core dump backtrace is:
Core was generated by `./tvheadend -d --http_root /vdradmin'.
Program terminated with signal SIGABRT, Aborted.
#0 0x7554a578 in raise () from /usr/lib/libc.so.6
[Current thread is 1 (Thread 0x705ff100 (LWP 15842))]
(gdb) bt
#0 0x7554a578 in raise () from /usr/lib/libc.so.6
#1 0x7554bbe4 in abort () from /usr/lib/libc.so.6
#2 0x54c05794 in dvr_entry_cancel (de=0x705ff100, rerecord=1969619064) at src/dvr/dvr_db.c:3705
#3 0x54be7160 in api_idnode_handler (perm=perm@entry=0x746004e8, args=args@entry=0x746009d0, resp=resp@entry=0x568cf4e8, handler=0x4e, op=0x54c9e6d4 "cancel", destroyed=destroyed@entry=0) at src/api/api_idnode.c:672
#4 0x54beb940 in api_dvr_entry_cancel (perm=perm@entry=0x746004e8, opaque=<optimized out>, op=<optimized out>, args=args@entry=0x746009d0, resp=resp@entry=0x705fe654) at src/api/api_dvr.c:319
#5 0x54be4eb4 in api_exec (perm=<optimized out>, subsystem=subsystem@entry=0x7460088a "dvr/entry/cancel", args=args@entry=0x746009d0, resp=0x705fe654, resp@entry=0x705fe64c) at src/api.c:97
#6 0x54c18e38 in webui_api_handler (hc=0x705fe958, remain=0x7460088a "dvr/entry/cancel", opaque=<optimized out>) at src/webui/webui_api.c:43
#7 0x54b92610 in http_exec (hc=hc@entry=0x705fe958, hp=hp@entry=0x705fe694, remain=0x7460088a "dvr/entry/cancel") at src/http.c:935
#8 0x54b931b8 in http_cmd_get (hc=0x705fe958) at src/http.c:1010
#9 0x54b933c4 in http_process_request (hc=0x705fe958, spill=<optimized out>) at src/http.c:1089
#10 0x54b92b00 in process_request (hc=hc@entry=0x705fe958, spill=spill@entry=0x705fe920) at src/http.c:1212
#11 0x54b93758 in http_serve_requests (hc=hc@entry=0x705fe958) at src/http.c:1507
#12 0x54b93994 in http_serve (fd=33, opaque=opaque@entry=0x71c00898, peer=peer@entry=0x71c008a4, self=self@entry=0x71c00924) at src/http.c:1554
#13 0x54b8bd4c in tcp_server_start (aux=0x71c00880) at src/tcp.c:651
#14 0x54b87588 in thread_wrapper (p=0x71c00ce0) at src/wrappers.c:159
#15 0x75703e9c in start_thread () from /usr/lib/libpthread.so.0
#16 0x755f1fc8 in ?? () from /usr/lib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

It seems that the code is not written to handle deletion of autorec timers, but perhaps aborting is not the best solution:)

History

#1

Updated by Dave Pickles over 7 years ago

It seems that it is not possible to delete an autorec timer in this way:( I've created PR #978 to add a new function to the API which will delete autorecs.

#2

Updated by Jaroslav Kysela over 7 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset commit:tvheadend|3518a0d88702be20aed5f567befd3806a30b9f21.

Also available in: Atom PDF