[PYTHON] Possible bugs revealed by socket_wrapper

Andreas Schneider asn at samba.org
Tue Nov 13 15:30:35 UTC 2018


On Tuesday, 13 November 2018 15:50:10 CET Noel Power wrote:
> Hi Andreas
> 
> I think maybe the bug lies in swrap, looking at a strace of the make
> testenv I see
> 
> 25607 fcntl(5, F_GETFL) = 0x2 (flags O_RDWR)
> 25607 fcntl(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0
> 25607 brk(0x562ecc3e3000)               = 0x562ecc3e3000
> 25607 getpid()                          = 25607
> 25607 ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
> 25607 fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0
> 25607 readlink("/proc/self/fd/0", "/dev/pts/3", 4095) = 10
> 25607 stat("/dev/pts/3", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3),
> ...}) = 0
> 25607 getpid()                          = 25607
> 25607 write(2, "SWRAP_ERROR[tmux (25607)] - find"..., 132) = 132
> 25607 close(2147483647)                 = -1 EBADF (Bad file descriptor)
> 25607 fcntl(0, F_GETFL)                 = 0x8402 (flags
> O_RDWR|O_APPEND|O_LARGEFILE)
> 25607 fcntl(0, F_SETFL, O_RDWR|O_APPEND|O_NONBLOCK|O_LARGEFILE) = 0
> 25607 dup(0)                            = 6
> 25607 getpid()                          = 25607
> 
> The close "25607 close(2147483647)                 = -1 EBADF (Bad file
> descriptor)" seems a bit suspicious and I don't see the high numbers of
> fd(s) really opened when looking through the strace (I attach the strace
> for you )
> 
> strace was generated from
> 
>       strace -f -o chgdcpass.strace make testenv
> SELFTEST_TESTENV=chgdcpass SCREEN=1

If it is really a socket_wrapper bug, why does it work on my opensuse install 
but not work on Ubuntu. And this happens only in python processes. I don't see 
that in any other process.


	Andreas



-- 
Andreas Schneider                      asn at samba.org
Samba Team                             www.samba.org
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D





More information about the samba-technical mailing list