Web lists-archives.com

Re: [Samba] Kodi crashes when trying to browse network




On Fri, Nov 02, 2018 at 02:21:41PM -0500, Michael Cronenworth via samba wrote:
> 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.

Well your original backtrace showed it dying at line:

lib/util/genrand.c:37

Which is:

 30 static void open_urandom(void)
 31 {
 32         if (urand_fd != -1) {
 33                 return;
 34         }
 35         urand_fd = open( "/dev/urandom", O_RDONLY,0);
 36         if (urand_fd == -1) {
 37                 abort();
 38         }
 39         smb_set_close_on_exec(urand_fd);
 40 }

the abort(), which gets triggered if urand_fd == -1
after open. So you'll need to debug that.

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba