Michael Cronenworth
2018-Nov-01 14:40 UTC
[Samba] Kodi crashes when trying to browse network
Hi, I maintain Kodi[1] in RPMFusion[2] and the latest version of Kodi, 18.0, is crashing when trying to browse the SMB network. The previous version, 17.x, worked fine. The backtrace shows that Samba was not able to open /dev/urandom, which can't be true and must be masking another issue. The issue occurs on any Fedora 28 or 29 system (multiple user reports[3]). SELinux is disabled and /dev/urandom is chmod' 666. Any pointers? Backtrace from samba-client-libs-4.9.1-2.fc29.x86_64: #0 0x00007fe785c0b53f in raise () from /lib64/libc.so.6 #1 0x00007fe785bf5895 in abort () from /lib64/libc.so.6 #2 0x00007fe782ad97d5 in open_urandom () at ../lib/util/genrand.c:37 #3 generate_random_buffer (out=out at entry=0x7ffeb252b536 ".\025\260\230\027\207\260U", len=len at entry=2) at ../lib/util/genrand.c:46 #4 0x00007fe78501fc6e in generate_trn_id () at ../source3/libsmb/namequery.c:1276 #5 name_query_send (mem_ctx=<optimized out>, ev=0x55b08717c250, name=name at entry=0x7fe7884799ed "\001\002__MSBROWSE__\002", name_type=name_type at entry=1, bcast=bcast at entry=true, recurse=recurse at entry=true, addr=0x7fe73c061260) at ../source3/libsmb/namequery.c:1276 #6 0x00007fe785020869 in name_queries_send (bcast=true, recurse=true, wait_msec=0, timeout_msec=1000, num_addrs=1, addrs=0x7fe73c061260, name_type=1, name=0x7fe7884799ed "\001\002__MSBROWSE__\002", ev=0x55b08717c250, mem_ctx=<optimized out>) at ../source3/libsmb/namequery.c:1660 #7 name_resolve_bcast_send (mem_ctx=mem_ctx at entry=0x55b087149140, ev=ev at entry=0x55b08717c250, name=name at entry=0x7fe7884799ed "\001\002__MSBROWSE__\002", name_type=name_type at entry=1) at ../source3/libsmb/namequery.c:1858 #8 0x00007fe785020b7b in name_resolve_bcast ( name=name at entry=0x7fe7884799ed "\001\002__MSBROWSE__\002", name_type=name_type at entry=1, mem_ctx=0x55b087176150, return_iplist=return_iplist at entry=0x7ffeb252ba50, return_count=return_count at entry=0x7ffeb252ba48) at ../source3/libsmb/namequery.c:1916 #9 0x00007fe788464b2a in SMBC_opendir_ctx (context=0x55b08715a250, fname=0x7ffeb252bf40 "smb://") at ../source3/libsmb/libsmb_dir.c:603 #10 0x00007fe788461935 in smbc_opendir (durl=0x7ffeb252bf40 "smb://") at ../source3/libsmb/libsmb_compat.c:253 #11 0x000055b0832d4f62 in XFILE::CSMBDirectory::OpenDir(CURL const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) () (snipped) Thanks, Michael [1] https://kodi.tv/ [2] https://rpmfusion.org/ [3] https://bugzilla.rpmfusion.org/show_bug.cgi?id=5001
On Thu, 1 Nov 2018 09:40:32 -0500 Michael Cronenworth via samba <samba at lists.samba.org> wrote:> Hi, > > I maintain Kodi[1] in RPMFusion[2] and the latest version of Kodi, > 18.0, is crashing when trying to browse the SMB network. The previous > version, 17.x, worked fine. > > The backtrace shows that Samba was not able to open /dev/urandom, > which can't be true and must be masking another issue. The issue > occurs on any Fedora 28 or 29 system (multiple user reports[3]). > SELinux is disabled and /dev/urandom is chmod' 666. > > Any pointers? >Can you post the smb.conf you are using Rowland
Michael Cronenworth
2018-Nov-01 15:46 UTC
[Samba] Kodi crashes when trying to browse network
On 11/1/18 10:37 AM, Rowland Penny via samba wrote:> Can you post the smb.conf you are usingIt's the default smb.conf for Samba 4.9 that all Fedora users receive. Attaching anyway. Thanks, Michael -------------- next part -------------- # See smb.conf.example for a more detailed config file or # read the smb.conf manpage. # Run 'testparm' to verify the config is correct after # you modified it. [global] workgroup = SAMBA security = user passdb backend = tdbsam printing = cups printcap name = cups load printers = yes cups options = raw [homes] comment = Home Directories valid users = %S, %D%w%S browseable = No read only = No inherit acls = Yes [printers] comment = All Printers path = /var/tmp printable = Yes create mask = 0600 browseable = No [print$] comment = Printer Drivers path = /var/lib/samba/drivers write list = @printadmin root force group = @printadmin create mask = 0664 directory mask = 0775
On Thu, Nov 01, 2018 at 09:40:32AM -0500, Michael Cronenworth via samba wrote:> Hi, > > I maintain Kodi[1] in RPMFusion[2] and the latest version of Kodi, 18.0, is > crashing when trying to browse the SMB network. The previous version, 17.x, > worked fine. > > The backtrace shows that Samba was not able to open /dev/urandom, which > can't be true and must be masking another issue. The issue occurs on any > Fedora 28 or 29 system (multiple user reports[3]). SELinux is disabled and > /dev/urandom is chmod' 666. > > Any pointers? > > Backtrace from samba-client-libs-4.9.1-2.fc29.x86_64: > #0 0x00007fe785c0b53f in raise () from /lib64/libc.so.6 > #1 0x00007fe785bf5895 in abort () from /lib64/libc.so.6 > #2 0x00007fe782ad97d5 in open_urandom () at ../lib/util/genrand.c:37 > #3 generate_random_buffer (out=out at entry=0x7ffeb252b536 ".\025\260\230\027\207\260U", > len=len at entry=2) at ../lib/util/genrand.c:46The above is deliberate. open of /dev/urandom should never fail. If it does we have worse problems :-). https://en.wikipedia.org/wiki//dev/random "In Unix-like operating systems, /dev/random, /dev/urandom and /dev/arandom are special files that serve as pseudorandom number generators. They allow access to environmental noise collected from device drivers and other sources.[1] /dev/random typically blocks if there is less entropy available than requested; /dev/urandom typically never blocks, even if the pseudorandom number generator seed was not fully initialized with entropy since boot." What errno is being returned on open of /dev/urandom ?
Michael Cronenworth
2018-Nov-02 19:21 UTC
[Samba] Kodi crashes when trying to browse network
On 11/2/18 1:32 PM, Jeremy Allison wrote:> What errno is being returned on open of /dev/urandom ?I think the backtrace is being munged or the stack is being blown. When I debug during the crash here is what I find: (gdb) p urand_fd $4 = 56 OK... so the fd is set? and 56? I can confirm that fd 56 is /dev/urandom: $ ls -l /proc/14777/fd/56 lr-x------. 1 michael michael 64 Nov 2 14:17 /proc/14777/fd/56 -> /dev/urandom So for grins what is the errno? (gdb) p errno $5 = 95 -- EOPNOTSUPP I'm not sure that helped.