ushare crashes on start-up when USHARE_ENABLE_DNLA=yes

Bug #886888 reported by salimfadhley
142
This bug affects 28 people
Affects Status Importance Assigned to Milestone
libdlna (Ubuntu)
Fix Released
Undecided
Unassigned
ushare (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Running ushare on ubuntu 11.10 64bit:

root@bobnit:~# sudo /usr/bin/ushare
Interface eth0 is down.
Recheck uShare's configuration and try again !
uShare (version 1.1a), a lightweight UPnP A/V and DLNA Media Server.
Benjamin Zores (C) 2005-2007, for GeeXboX Team.
See http://ushare.geexbox.org/ for updates.
Listening on telnet port 1337
Initializing UPnP subsystem ...
Starting in XboX 360 compliant profile ...
Starting in DLNA compliant profile ...
UPnP MediaServer listening on 192.168.10.170:49153
Sending UPnP advertisement for device ...
Listening for control point connections ...
Building Metadata List ...
Looking for files in content directory : /home/sal/torrents
*** glibc detected *** /usr/bin/ushare: malloc(): memory corruption: 0x000000000154d830 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x78a96)[0x7fcaf4bfca96]
/lib/x86_64-linux-gnu/libc.so.6(+0x7a5f8)[0x7fcaf4bfe5f8]
/lib/x86_64-linux-gnu/libc.so.6(+0x7b121)[0x7fcaf4bff121]
/lib/x86_64-linux-gnu/libc.so.6(__libc_memalign+0x93)[0x7fcaf4c01213]
/lib/x86_64-linux-gnu/libc.so.6(posix_memalign+0x74)[0x7fcaf4c02444]
/usr/lib/libavutil.so.51(av_malloc+0x2b)[0x7fcaf3740a2b]
/usr/lib/libavutil.so.51(av_mallocz+0x16)[0x7fcaf3740aa6]
/usr/lib/libavformat.so.53(avformat_open_input+0x122)[0x7fcaf473a202]
/usr/lib/libdlna.so.0(dlna_guess_media_profile+0x4a)[0x7fcaf4f2afea]
/usr/bin/ushare[0x40613d]
/usr/bin/ushare[0x40640e]
/usr/bin/ushare[0x4064cf]
/usr/bin/ushare[0x406777]
/usr/bin/ushare[0x402a6a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7fcaf4ba530d]
/usr/bin/ushare[0x402cb1]

Related branches

Revision history for this message
salimfadhley (salimfadhley) wrote :

ushare:
  Installed: 1.1a-0ubuntu6
  Candidate: 1.1a-0ubuntu6
  Version table:
 *** 1.1a-0ubuntu6 0
        500 http://gb.archive.ubuntu.com/ubuntu/ oneiric/universe amd64 Packages
        100 /var/lib/dpkg/status
root@bobnit:~#

root@bobnit:~# lsb_release -rd
Description: Ubuntu 11.10
Release: 11.10
root@bobnit:~#

Revision history for this message
salimfadhley (salimfadhley) wrote :

I've determined that this fault only occurs when DLNA is set to yes.

This crash did not occur in the previous configuration when XBOX-mode was set to yes but DLNA was set to no.

summary: - ushare crashes glibc malloc
+ ushare crashes on start-up when USHARE_ENABLE_DNLA=yes
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ushare (Ubuntu):
status: New → Confirmed
cholt45 (cholt45)
description: updated
Revision history for this message
Robert Collins (lifeless) wrote :

Running under valgrind I see:
Looking for files in content directory : /home/robertc/usharetest
==32075== Conditional jump or move depends on uninitialised value(s)
==32075== at 0x5D38726: avformat_open_input (in /usr/lib/x86_64-linux-gnu/libavformat.so.53.21.0)
==32075== by 0x54A8FE9: dlna_guess_media_profile (in /usr/lib/libdlna.so.0.2.3)
==32075== by 0x4062C4: ??? (in /usr/bin/ushare)
==32075== by 0x4065A6: ??? (in /usr/bin/ushare)
==32075== by 0x40662E: ??? (in /usr/bin/ushare)
==32075== by 0x406A30: ??? (in /usr/bin/ushare)
==32075== by 0x402BD9: ??? (in /usr/bin/ushare)
==32075== by 0x56D576C: (below main) (libc-start.c:226)
==32075==
==32075== Use of uninitialised value of size 8
==32075== at 0x5D38763: avformat_open_input (in /usr/lib/x86_64-linux-gnu/libavformat.so.53.21.0)
==32075== by 0x54A8FE9: dlna_guess_media_profile (in /usr/lib/libdlna.so.0.2.3)
==32075== by 0x4062C4: ??? (in /usr/bin/ushare)
==32075== by 0x4065A6: ??? (in /usr/bin/ushare)
==32075== by 0x40662E: ??? (in /usr/bin/ushare)
==32075== by 0x406A30: ??? (in /usr/bin/ushare)
==32075== by 0x402BD9: ??? (in /usr/bin/ushare)
==32075== by 0x56D576C: (below main) (libc-start.c:226)
==32075==

Revision history for this message
Robert Collins (lifeless) wrote :

With symbols
==8663== Conditional jump or move depends on uninitialised value(s)
==8663== at 0x5DA1F10: avformat_open_input (utils.c:614)
==8663== by 0x54A8FE9: dlna_guess_media_profile (in /usr/lib/libdlna.so.0.2.3)
==8663== by 0x4062C4: ??? (in /usr/bin/ushare)
==8663== by 0x4065A6: ??? (in /usr/bin/ushare)
==8663== by 0x40662E: ??? (in /usr/bin/ushare)
==8663== by 0x406A30: ??? (in /usr/bin/ushare)
==8663== by 0x402BD9: ??? (in /usr/bin/ushare)

Revision history for this message
Robert Collins (lifeless) wrote :

==2522== Conditional jump or move depends on uninitialised value(s)
==2522== at 0x5DA1F10: avformat_open_input (utils.c:614)
==2522== by 0x54A9219: dlna_guess_media_profile (profiles.c:283)

Revision history for this message
Robert Collins (lifeless) wrote :

init_input is being called with a bad s pointer:
#0 0x00007ffff6ce4d65 in init_input (s=0x6e0000005b, filename=0x61aad0 "...", options=0x7fffffffd350)
    at /home/robertc/source/ubuntu/libav-0.8.4/libavformat/utils.c:586

(gdb) print filename
$2 = 0x61aad0 "..."
(gdb) print *s
Cannot access memory at address 0x6e0000005b

which is being passed in from avformat_open_input:
#1 0x00007ffff6ce4f98 in avformat_open_input (ps=0x7fffffffd3c0, filename=0x61aad0 "...", fmt=0x0, options=0x0)
    at /home/robertc/source/ubuntu/libav-0.8.4/libavformat/utils.c:625
print ps
$4 = (AVFormatContext **) 0x7fffffffd3c0
(gdb) print *ps
$5 = (AVFormatContext *) 0x6e0000005b

-> libdlna is bust:

  AVFormatContext *ctx;
  dlna_registered_profile_t *p;
  dlna_profile_t *profile = NULL;
  dlna_container_type_t st;
  av_codecs_t *codecs;

  if (!dlna)
    return NULL;

  if (!dlna->inited)
    dlna = dlna_init ();

  if (avformat_open_input (&ctx, filename, NULL, NULL) != 0)

Note how ctx is not initialised.

Revision history for this message
Robert Collins (lifeless) wrote :

Initialising ctx to NULL corrects the problem.

Revision history for this message
Robert Collins (lifeless) wrote :

I have emailed a patch upstream and dput a patched libdlna into raring.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libdlna - 0.2.3-0ubuntu8

---------------
libdlna (0.2.3-0ubuntu8) raring; urgency=low

  * Initialize libav context pointer (LP: #886888).
 -- Robert Collins <email address hidden> Sat, 24 Nov 2012 22:51:08 +1300

Changed in libdlna (Ubuntu):
status: New → Fix Released
Revision history for this message
Robert Collins (lifeless) wrote :

ushare wasn't at fault here. I've left the task in place to help folk searching for this issue.

Changed in ushare (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Martin Gyurko (gyurma) wrote :

this is still a problem on 64bit system...

Revision history for this message
Martin Gyurko (gyurma) wrote :

Packages from:
Letöltés:1 http://hu.archive.ubuntu.com/ubuntu/ precise/universe libdlna0 amd64 0.2.3-0ubuntu7 [26,0 kB]
Letöltés:2 http://hu.archive.ubuntu.com/ubuntu/ precise/universe ushare amd64 1.1a-0ubuntu7 [53,1 kB]

Revision history for this message
Slogger (slogger) wrote :

I can confirm this is still happening for me on 64 bit...

Revision history for this message
Slogger (slogger) wrote :

(12.04 Precise Pangolin)

Revision history for this message
Sven Jacobs (svenjacobs) wrote :

Yes, still crashes on 12.04 64bit. libdlna is version 0.2.3.

Revision history for this message
Marc Cabana (thebuzzer) wrote :
Download full text (4.0 KiB)

# lsb_release -rd
Description: Ubuntu 13.10
Release: 13.10
# uname -a
Linux DELL-SERVER-Marc 3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:17:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
======
iF ushare 1.1a-0ubuntu10 amd64 lightweight UPnP A/V Media Server
ii libav-tools 6:0.8.10-0ubuntu0.13.10.1 amd64 Multimedia player, server, encoder and transcoder
ii libavahi-client3:amd64 0.6.31-2ubuntu4.1 amd64 Avahi client library
ii libavahi-common-data:amd64 0.6.31-2ubuntu4.1 amd64 Avahi common data files
ii libavahi-common3:amd64 0.6.31-2ubuntu4.1 amd64 Avahi common library
ii libavahi-core7:amd64 0.6.31-2ubuntu4.1 amd64 Avahi's embeddable mDNS/DNS-SD library
ii libavahi-glib1:amd64 0.6.31-2ubuntu4.1 amd64 Avahi GLib integration library
ii libavc1394-0:amd64 0.5.4-2 amd64 control IEEE 1394 audio/video devices
ii libavcodec-dev 6:0.8.10-0ubuntu0.13.10.1 amd64 Development files for libavcodec
ii libavcodec53:amd64 6:0.8.10-0ubuntu0.13.10.1 amd64 Libav codec library
ii libavdevice53:amd64 6:0.8.10-0ubuntu0.13.10.1 amd64 Libav device handling library
ii libavfilter2:amd64 6:0.8.10-0ubuntu0.13.10.1 amd64 Libav video filtering library
ii libavformat-dev 6:0.8.10-0ubuntu0.13.10.1 amd64 Development files for libavformat
ii libavformat53:amd64 6:0.8.10-0ubuntu0.13.10.1 amd64 Libav file format library
ii libavutil-dev 6:0.8.10-0ubuntu0.13.10.1 amd64 Development files for libavutil
ii libavutil51:amd64 6:0.8.10-0ubuntu0.13.10.1 amd64 Libav utility library
======

# ushare
L'interface eth0 est arrêtée.
Revérifiez la configuration de uShare et recommencez !
uShare (version 1.1a), a lightweight UPnP A/V and DLNA Media Server.
Benjamin Zores (C) 2005-2007, pour l'équipe GeeXboX.
Voir http://ushare.geexbox.org/ pour les mises à jour.
Initialisation du système UPnP ...
Démarre en mode compatibilité DLNA ...
Serveur Multimédia UPnP en écoute sur 192.168.0.145:49200
Envoit des informations UPnP du périphérique ...
Attente de connexions ...
Building Metadata List ...
Looking for files in content directory : /mnt/sdd1
Segmentation fault (core dumped)

==================

# ifconfig
eth0 Link encap:Ethernet HWaddr 00:14:22:0d:f2:ba
          inet addr:192.168.0.145 Bcast:192.168.0.255 Mask:255.255.255.0
          inet6 addr: fe80::214:22ff:fe0d:f2ba/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:516119200 errors:8 dropped:0 overruns:0 frame:4
          TX packets:659413611 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
   ...

Read more...

Revision history for this message
Jesse Michael (jesse.michael) wrote :

This crash is still happening on a fully-updated 14.10--

# lsb_release -rd
Description: Ubuntu 14.10
Release: 14.10

# uname -a
Linux chernobyl 3.16.0-30-generic #40-Ubuntu SMP Mon Jan 12 22:06:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

# dpkg-query -l ushare libdlna0
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii libdlna0 0.2.4-0ubunt amd64 DLNA codec library
ii ushare 1.1a-0ubuntu amd64 lightweight UPnP A/V Media Server

# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:22:4d:50:ca:23
          inet addr:10.0.0.10 Bcast:10.0.0.255 Mask:255.255.255.0
          inet6 addr: fe80::222:4dff:fe50:ca23/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:955523 errors:0 dropped:0 overruns:0 frame:0
          TX packets:517910 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:773726534 (773.7 MB) TX bytes:68450904 (68.4 MB)
          Interrupt:20 Memory:f6400000-f6420000

With USHARE_ENABLE_DLNA set to "no"--

# ushare
Interface eth0 is down.
Recheck uShare's configuration and try again !
uShare (version 1.1a), a lightweight UPnP A/V and DLNA Media Server.
Benjamin Zores (C) 2005-2007, for GeeXboX Team.
See http://ushare.geexbox.org/ for updates.
Listening on telnet port 1337
Initializing UPnP subsystem ...
UPnP MediaServer listening on 10.0.0.10:49152
Sending UPnP advertisement for device ...
Listening for control point connections ...
Building Metadata List ...
Looking for files in content directory : /data/shared/clips
Found 18 files and subdirectories.

With USHARE_ENABLE_DLNA set to "yes"--

# ushare
Interface eth0 is down.
Recheck uShare's configuration and try again !
uShare (version 1.1a), a lightweight UPnP A/V and DLNA Media Server.
Benjamin Zores (C) 2005-2007, for GeeXboX Team.
See http://ushare.geexbox.org/ for updates.
Listening on telnet port 1337
Initializing UPnP subsystem ...
Starting in DLNA compliant profile ...
UPnP MediaServer listening on 10.0.0.10:49153
Sending UPnP advertisement for device ...
Listening for control point connections ...
Building Metadata List ...
Looking for files in content directory : /data/shared/clips
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '(null)':
  Metadata:
    major_brand : mp42
    minor_version : 0
    compatible_brands: isommp42
    creation_time : 2014-03-07 09:33:43
  Duration: 00:12:20.94, start: 0.000000, bitrate: 1775 kb/s
    Stream #0.0(und): Video: h264 (High), yuv420p, 1280x534 [PAR 801:800 DAR 12:5], 1581 kb/s, 23.98 fps, 24k tbn, 47.95 tbc (default)
    Stream #0.1(und): Audio: aac, 44100 Hz, stereo, fltp, 191 kb/s (default)
    Metadata:
      creation_time : 2014-03-07 09:33:55
Found container: mov,mp4,m4a,3gp,3g2,mj2
AAC Object Type: 2
Segmentation fault (core dumped)

Revision history for this message
Jérôme Benoit (jerome-benoit) wrote :

Still happening in 16.04 Ubuntu release :

traps: ushare[21107] general protection ip:7f3a8bf9c660 sp:7ffdf12bc8c0 error:0 in libavformat-ffmpeg.so.56.40.101[7f3a8be35000+1d4000]

Revision history for this message
grufo (ml-grufo) wrote :

Same problem here...:

Linux 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

ushare
Interface enp0s25 ist down.
Überprüfe uShare's Konfiguration und versuche es erneut!
uShare (version 1.1a), a lightweight UPnP A/V and DLNA Media Server.
Benjamin Zores (C) 2005-2007, für das GeeXboX Team.
Für Updates gehe auf http://ushare.geexbox.org/.
Listening on telnet port 1337
Initialisiere UPnP Subsystem ...
Starting in DLNA compliant profile ...
UPnP MediaServer lauscht auf 192.168.10.93:49201
Sende UpnP Advertisement für Gerät...
Lausche auf Control Point Verbindungen...
Building Metadata List ...
Looking for files in content directory : /srv/samba/musik
[mp3 @ 0x1bf2460] Skipping 0 bytes of junk at 2319.
Input #0, mp3, from '(null)':
  Metadata:
    artist : Django 3000
    album : Django 3000
    title : ZEIT FIA OIS
    track : 01/12
    genre : Folklore
    date : 2012
    TDTG : 2014-10-05T08:53:36
  Duration: 00:03:38.49, start: 0.025057, bitrate: 320 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
    Metadata:
      encoder : LAME3.99r
    Side data:
      replaygain: track gain - -10,400000, track peak - unknown, album gain - unknown, album peak - unknown,
Found container: mp3
Speicherzugriffsfehler

Jun 1 06:56:16 lamusica kernel: [ 3063.656663] traps: ushare[4938] general protection ip:7ff3a8a63660 sp:7ffcb707cee0 error:0 in libavformat-ffmpeg.so.56.40.101[7ff3a88fc000+1d4000]

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.