On Wed, Oct 05, 2016 at 03:30:02PM +0100, Stuart Henderson wrote:
> On 2016/10/05 15:08, Stuart Henderson wrote:
> > On 2016/10/05 18:05, Alexandr Shadchin wrote:
> > > On Wed, Oct 05, 2016 at 12:31:27PM +0100, Stuart Henderson wrote:
> > > > There's a segfault when py-requests GETs an https resource (segv occurs
> > > > after it calls verify_cb, it happens every time for every site I've 
> > > > tried).
> > > > e.g.
> > > > 
> > > > $ printf "import requests\nr = 
> > > > requests.get('https://www.openbsd.org/')\n" | python2.7
> > > > Segmentation fault (core dumped) 
> > > > 
> > > > Any ideas who is to blame or where to poke at next?
> > > > 
> > > 
> > > I test on two machines, work fine, no segv.
> > > 
> > > Snapshot:
> > > 
> > > kern.version=OpenBSD 6.0-current (GENERIC.MP) #2529: Tue Oct  4 17:53:45 
> > > MDT 2016
> > >     dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > > 
> > > Python 2.7.12 (default, Sep 26 2016, 15:57:20)
> > > [GCC 4.2.1 20070719 ] on openbsd6
> > 
> > Weird. I've tried on another machine which is also OK. I've forcibly
> > reinstalled all packages (and am using a current base snapshot) so I'm
> > up-to-date everywhere on the machine where it's failing.
> 
> Same for py-requests-2.10.0, FWIW.

I have a similar crash on macppc, and this breaks letsencrypt renew.
This is with a snap from end of july (libssl.so.39.0) and py-requests 2.10.0.
gdb is of course unusable:

#0  0xafcb746c in _thread_sys___syscall () at <stdin>:2
#1  0xafc79c94 in *_libc_mmap (addr=Variable "addr" is not available.
) at /usr/src/lib/libc/sys/mmap.c:47
#2  0xac7bcf50 in b_callback () from 
/usr/local/lib/python2.7/site-packages/_cffi_backend.so
#3  0xac7bcf50 in b_callback () from 
/usr/local/lib/python2.7/site-packages/_cffi_backend.so

ktracing it, it blows on an mmap call.

  7237 python2.7 CALL  socket(AF_INET,0x1<SOCK_STREAM>,0x6)
  7237 python2.7 RET   socket 3
  7237 python2.7 CALL  setsockopt(3,6<tcp>,1,0xffff4548,4)
  7237 python2.7 RET   setsockopt 0
  7237 python2.7 CALL  fcntl(3,F_GETFL)
  7237 python2.7 RET   fcntl 2
  7237 python2.7 CALL  fcntl(3,F_SETFL,0x2<O_RDWR>)
  7237 python2.7 RET   fcntl 0
  7237 python2.7 CALL  connect(3,0xffff4570,16)
  7237 python2.7 STRU  struct sockaddr { AF_INET, 129.128.5.194:443 }
  7237 python2.7 RET   connect 0
  7237 python2.7 CALL  gettimeofday(0xffff4a10,0)
  7237 python2.7 STRU  struct timeval { 1476172774<"Oct 11 09:59:34 
2016">.021350 }
  7237 python2.7 RET   gettimeofday 0
  7237 python2.7 CALL  kbind(0xffff494c,12,0x23e74200b3124c51)
  7237 python2.7 RET   kbind 0
  7237 python2.7 CALL  
mmap(0,0x1000,0x7<PROT_READ|PROT_WRITE|PROT_EXEC>,0x1002<MAP_PRIVATE|MAP_ANON>,-1,0)
  7237 python2.7 PSIG  SIGABRT SIG_DFL
  7237 python2.7 NAMI  "python2.7.core"

Reply via email to