Project

General

Profile

Actions

Bug #1343

closed

Crash in tvheadend

Added by Jeremy Bush over 12 years ago. Updated over 12 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
EPG - Grabbers
Target version:
Start date:
2012-10-19
Due date:
% Done:

0%

Estimated time:
Found in version:
release/3.2
Affected Versions:

Description

I'm getting crashes in the backend every so often. Here's a log entry of it:

Oct 18 22:34:32 htpc tvheadend[31684]: mkv: /media/Drobo01/dvr/6-1-WITIDT/Seinfeld.2012-10-18.22-35.mkv: Write failed -- No space left on device
Oct 18 22:34:32 htpc tvheadend[31684]: dvr: Recording error: "/media/Drobo01/dvr/6-1-WITIDT/Seinfeld.2012-10-18.22-35.mkv": Unable to init file
Oct 18 22:36:42 htpc tvheadend[31684]: CRASH: Signal: 11 in PRG: /usr/src/tvheadend/build.linux/tvheadend (3.1.769~g4303374-dirty) [7ebe00d49e654a5439f901b7395184165f1d9c97] CWD: /usr/src/tvheadend  
Oct 18 22:36:42 htpc tvheadend[31684]: CRASH: Fault address 0x4f18 (Address not mapped)
Oct 18 22:36:42 htpc tvheadend[31684]: CRASH: Loaded libraries: linux-gate.so.1 /usr/lib/libssl.so.1.0.0 /usr/lib/libcrypto.so.1.0.0 /lib/libz.so.1 /lib/librt.so.1 /lib/libdl.so.2 /lib/libpthread.so.0 /lib/libc.so.6 /lib/ld-linux.so.2  
Oct 18 22:36:42 htpc tvheadend[31684]: CRASH: Register dump [19]: 00000033 c1430000 ffff007b 0000007b ae492288 ae1be548 b09ff1d8 b09ff1c0 ae492288 ae3a4630 aeb00010 00004f10 0000000e 00000004 08057d52 00000073 00010246 b09ff1c0 0000007b 
Oct 18 22:36:42 htpc tvheadend[31684]: CRASH: STACKTRACE
Oct 18 22:36:42 htpc tvheadend[31684]: CRASH: /usr/src/tvheadend/src/trap.c:139 0x806c5ff
Oct 18 22:36:42 htpc tvheadend[31684]: CRASH: __kernel_rt_sigreturn+0x0  (linux-gate.so.1)
Oct 18 22:36:42 htpc tvheadend[31684]: CRASH: /usr/src/tvheadend/src/dvr/mkmux.c:898 0x8082031
Oct 18 22:36:42 htpc tvheadend[31684]: CRASH: /usr/src/tvheadend/src/muxer_tvh.c:124 0x808bafc
Oct 18 22:36:42 htpc tvheadend[31684]: CRASH: /usr/src/tvheadend/src/dvr/dvr_rec.c:445 0x807f1ae
Oct 18 22:36:42 htpc tvheadend[31684]: CRASH: ??:0 0xb76c6f07
Oct 18 22:36:42 htpc tvheadend[31684]: CRASH: clone+0x5e  (/lib/libc.so.6)
Oct 18 22:36:42 htpc kernel: [1678757.998492] tvheadend[19816]: segfault at 4f18 ip 08057d52 sp b09ff1c0 error 4 in tvheadend[8048000+72000]

Since my codebase is marked dirty, here's my changes. It's just some additional logging code:

diff --git a/src/htsmsg.c b/src/htsmsg.c
index 5dd67e3..35979fb 100644
--- a/src/htsmsg.c
+++ b/src/htsmsg.c
@@ -16,6 +16,7 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */

+#include "tvheadend.h" 
 #include <assert.h>
 #include <sys/types.h>
 #include <stdio.h>
@@ -413,7 +414,10 @@ htsmsg_get_bin(htsmsg_t *msg, const char *name, const void **binp,
     return HTSMSG_ERR_FIELD_NOT_FOUND;

   if(f->hmf_type != HMF_BIN)
+  {
+    tvhlog(LOG_INFO, "htsp", "MSG Type: %i", f->hmf_type);
     return HTSMSG_ERR_CONVERSION_IMPOSSIBLE;
+  }

   *binp = f->hmf_bin;
   *lenp = f->hmf_binsize;
diff --git a/src/htsp.c b/src/htsp.c
index 789c036..90b009b 100644
--- a/src/htsp.c
+++ b/src/htsp.c
@@ -1249,8 +1249,14 @@ htsp_authenticate(htsp_connection_t *htsp, htsmsg_t *m)
     htsp_update_logname(htsp);
   }

-  if(htsmsg_get_bin(m, "digest", &digest, &digestlen))
+  int d = htsmsg_get_bin(m, "digest", &digest, &digestlen);
+  if(d)
+  {
+    tvhlog(LOG_INFO, "htsp", "%s: Digest is wrong: %i", htsp->htsp_logname, d);
     return;
+  }
+
+  tvhlog(LOG_INFO, "htsp", "%s: Trying digest...", htsp->htsp_logname);

   access = access_get_hashed(username, digest, htsp->htsp_challenge,
                             (struct sockaddr *)htsp->htsp_peer, &match);
Actions

Also available in: Atom PDF