Project

General

Profile

Bug #702

minidlna 0.92 crashes with a segv shortly after starting up

Added by cpg almost 10 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
DLNA
Target version:
-
Start date:
12/22/2010
Due date:
% Done:

0%


Description

not many details are known yet, but the latest top of the tree minidlna seems to crash a few seconds or a few minutes after starting up.

i was able to use a client for a few minutes, but i did not stream media.

foto.PNG View (26 KB) dieterdecooman, 12/28/2010 12:29 PM

History

#1 Updated by DSMunky almost 10 years ago

Getting a "DLNA Error 2101" on PS3 when trying to browse video
displaying "No Titles to display"

#2 Updated by DSMunky almost 10 years ago

Rebooted both PS3 and hda to see if that helps
Checked on the server and amahi-dlna was running also there were 2 amahi-dlna processes

  1. ps -A | grep amahi-dlna
    1706 ? 00:00:00 amahi-dlna
    1723 ? 00:00:30 amahi-dlna
checked again and no longer
  1. ps -A | grep amahi-dlna
    no output

Atempted to start service to no avail

service amahi-dlna start
no output

service amahi-dlna restart OK and service seems to be up however PS3 displays DLNA Error 2101 again

#3 Updated by cpg almost 10 years ago

i should point out that this is minidlna version 1.0.18.2m top of the tree.

here is a memory leak report from valgrind. not sure if it will help much.

http://fpaste.org/vxOy/

#4 Updated by cpg almost 10 years ago

i was able to attach to a running thread. appears to terminate normally after the scan finishes. In amahi we run it with -R historically (reboots are rare).

it is possible that -R exits normally?

(gdb) run -R -f /var/hda/apps/dlna/amahi.conf
Starting program: /home/cpg/amahi/git/tot-clean-1/apps/dlna/minidlna/minidlna -R -f /var/hda/apps/dlna/amahi.conf
[Thread debugging using libthread_db enabled]
..
Program exited normally.
(gdb) attach 25971
...
Reading symbols from /usr/lib64/libtasn1.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libtasn1.so.3
Reading symbols from /lib64/libgpg-error.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib64/libgpg-error.so.0
Reading symbols from /lib64/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/librt.so.1
0x0000003b7a8d7240 in __read_nocancel () from /lib64/libc.so.6
(gdb) c
Continuing.

Program exited normally.
(gdb) 

#5 Updated by cpg almost 10 years ago

i was able to capture the segv -

to reproduce, remove the DB, start mindlna, find the process IDs, then attach to them both in gdb. usually the second one is the one crashing.

seems related to setting up inotify!
coincidentally we did send a patch related to that?!?

(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff213a700 (LWP 16181)]
0x000000000041e693 in inotify_create_watches (fd=10) at inotify.c:194
194                     DPRINTF(E_DEBUG, L_INOTIFY, "Add watch to %s\n", result[i]);
(gdb) where
#0  0x000000000041e693 in inotify_create_watches (fd=10) at inotify.c:194
#1  0x000000000041fb60 in start_inotify () at inotify.c:656
#2  0x0000003b7b006d5b in start_thread () from /lib64/libpthread.so.0
#3  0x0000003b7a8e4aad in clone () from /lib64/libc.so.6
(gdb)

#6 Updated by cpg almost 10 years ago

  • Status changed from New to Assigned

further debugging seems to indicate that i and result are optimized away by the compiler

(gdb) p i
$1 = <value optimized out>
(gdb) p/x result[i]
value has been optimized out
(gdb)

The work around seems to be to comment out line 194 in inotify.c

DPRINTF(E_DEBUG, L_INOTIFY, "Add watch to %s\n", result[i]);

test rpms with this fix are available at:

http://alpha.amahi.org/tmp/amahi-dlna-0.92.1-1.x86_64.rpm
http://alpha.amahi.org/tmp/amahi-dlna-0.92.1-1.i686.rpm

please test and report back :)

#7 Updated by cpg almost 10 years ago

  • Status changed from Assigned to Feedback
  • Assignee set to cpg

#8 Updated by dieterdecooman almost 10 years ago

Running stable now.
Album cover art seems to work ! (tnx for this Xmas gift :))

Video thumbnails do not work, but don't know if this is a minidlna feature yet.
Inotify also does not work on local filesystem (disabled completely by workaround ?). Did not try with symbolic links yet (for which I believe the patch was ment).

Thanks for the progress !

#9 Updated by DSMunky almost 10 years ago

Tested video on PS3 and now working well as before. Been unable to test any more as only really use for video in the past. Will try and add some music and pictures over this week.

#10 Updated by uslacker almost 10 years ago

I upgraded to the patched version (1-1) and preliminary testing shows it is no longer crashing.

Thanks cpg

#11 Updated by dieterdecooman almost 10 years ago

I made a mistake in my previous test results : inotify DOES work on local filesystems and across symbolic links now (e.g. a symbolic link in my share to my USB drive mount).
Previously, I did not wait long enough as I did not know inotify is not real-time.(set by notify_interval parameter).

I have a nice DLNA server running now, just missing the dynamic video thumbs, but will see if I can do some pre-processing with ffmpeg...

#12 Updated by cpg almost 10 years ago

Great to hear! I tested inotify, though not through symlinks.

Can you try this, true top-of-the-tree ready-to-release:

http://alpha.amahi.org/tmp/amahi-dlna-0.92.2-1.x86_64.rpm
http://alpha.amahi.org/tmp/amahi-dlna-0.92.2-1.i686.rpm

Thanks for the feeback!

#13 Updated by dieterdecooman almost 10 years ago

Same stable results for 0.92.2-1.i686

What was the special feature that you announced in the original post
"There is also a little surprise in there

Bonus points to the first one to reveal the secret feature. ... Triple bonus points to the first one to show a picture of the new feature in action
"
Wonder if this was the albumart of if I need to look more :)

Dieter

#14 Updated by cpg almost 10 years ago

hehe - the app now shows the new amahi logo in 4 beautiful resolutions and color for those devices that can show the dlna server logo :)

thanks for the feedback.

#15 Updated by dieterdecooman almost 10 years ago

aha ! Beautiful :) works !!

#16 Updated by dieterdecooman almost 10 years ago

Looks like there is a patch now for video thumbnails and some FFWD and samsung. To be applied to top op the cvs tree ... Worth a try for new alpha CPG ?
https://sourceforge.net/tracker/?func=detail&atid=1121518&aid=3148380&group_id=243163

#17 Updated by cpg almost 10 years ago

dieterdecooman wrote:

aha ! Beautiful :) works !!

what app is that in the ipod!?

also, about the patch ... can we wait until it's more tested?

alternatively if you have a working tree maybe you can try it?
i just don't have as much time to work on this

#18 Updated by cpg almost 9 years ago

  • Status changed from Feedback to Closed

it would have been great if you told us what is that app running in the iphone!
please do! :)

closing

#19 Updated by cpg about 8 years ago

  • Project changed from 11 to apps
  • Category set to DLNA

Also available in: Atom