[Stackless] Problems on OS X

Jonathan Hogg jonathan at onegoodidea.com
Fri Sep 27 21:00:43 CEST 2002


Hi all,

I have two problems at the moment building and running Stackless on OS X
(10.2.1 "Jaguar"). The build problem is that the _socket extension is
failing as follows:

-----
building '_socket' extension
gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -no-cpp-precomp -I.
-I/Volumes/Data/Users/jonathan/Projects/Python-stackless/./Include
-I/Volumes/Data/Users/jonathan/Projects/Python-stackless/./Stackless
-I/Volumes/Data/Users/jonathan/Projects/Python-stackless/./Mac/Include
-I/usr/local/include -IInclude/ -c
/Volumes/Data/Users/jonathan/Projects/Python-stackless/Modules/socketmodule.
c -o build/temp.darwin-6.1-Power Macintosh-2.2/socketmodule.o
cc1: warning: changing search order for system directory
"/usr/local/include"
cc1: warning:   as it has already been specified as a non-system directory
In file included from
/Volumes/Data/Users/jonathan/Projects/Python-stackless/Modules/socketmodule.
c:232:
/Volumes/Data/Users/jonathan/Projects/Python-stackless/Modules/getaddrinfo.c
:71: `IN6ADDR_GAI_ANY_INIT' undeclared here (not in a function)
/Volumes/Data/Users/jonathan/Projects/Python-stackless/Modules/getaddrinfo.c
: In function `fake_getaddrinfo':
/Volumes/Data/Users/jonathan/Projects/Python-stackless/Modules/getaddrinfo.c
:435: structure has no member named `s6_addr8'
In file included from
/Volumes/Data/Users/jonathan/Projects/Python-stackless/Modules/socketmodule.
c:232:
/Volumes/Data/Users/jonathan/Projects/Python-stackless/Modules/getaddrinfo.c
: In function `get_addr':
/Volumes/Data/Users/jonathan/Projects/Python-stackless/Modules/getaddrinfo.c
:613: structure has no member named `s6_addr32'
/Volumes/Data/Users/jonathan/Projects/Python-stackless/Modules/getaddrinfo.c
:615: structure has no member named `s6_addr32'
WARNING: building of extension "_socket" failed: command 'gcc' failed with
exit status 1
-----

The second, runtime, problem is that I get an segv fault when a channel
"runs out":

-----
Python 2.2.1 Stackless 020925 (#1, Sep 26 2002, 11:27:33)
[GCC 3.1 20020420 (prerelease)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> import stackless
>>> c = stackless.channel()
>>> def foo( c ):
...     c.send( 5 )
... 
>>> t = stackless.tasklet(foo)(c)
>>> t.run()
<stackless.tasklet object at 0x350b00>
>>> c.receive()
5
>>> c.receive()
zsh: bus error  spython
-----

The OS X crash log reports:

-----
Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000000

Thread 0 Crashed:

PPC Thread State:
  srr0: 0x00000000 srr1: 0x4000f030                vrsave: 0x00000000
   xer: 0x00000000   lr: 0x00000002  ctr: 0x000917cc   mq: 0x00000000
    r0: 0x00000000   r1: 0xbfffe4d0   r2: 0x00073ba4   r3: 0x00000000
    r4: 0x00000000   r5: 0x00000001   r6: 0x000ca1c4   r7: 0x000c8f6c
    r8: 0x00364360   r9: 0x0000004f  r10: 0x000d026c  r11: 0x003545b0
   r12: 0x00000001  r13: 0x00000003  r14: 0xbffff3d0  r15: 0x0003826c
   r16: 0xbfffe800  r17: 0x2404424c  r18: 0x00038428  r19: 0x00049088
   r20: 0xbfffe500  r21: 0x00350a00  r22: 0x00049170  r23: 0x00049fc8
   r24: 0xbfffe500  r25: 0x00000000  r26: 0x0004a054  r27: 0x00000000
   r28: 0x00354580  r29: 0x003545a0  r30: 0x0000001f  r31: 0x00000000
-----

There's no stack trace in the crash log for some reason (is this a
side-effect of being stackless?).

Any ideas welcome. I'm happy to dig into the code and run debug stuff if it
helps.

Jonathan

-- 
jonathan hogg, one good idea ltd, 131 queen margaret dr., glasgow g20 8pd
http://www.onegoodidea.com/ tel:+44-(0)7976-614338 fax:+44-(0)7970-537451

_______________________________________________
Stackless mailing list
Stackless at www.tismer.com
http://www.tismer.com/mailman/listinfo/stackless



More information about the Stackless mailing list