These are chat archives for dropbox/pyston

3rd
Jan 2015
Bob Fang
@dorafmon
Jan 03 2015 13:03
Hi
Kevin Modzelewski
@kmod
Jan 03 2015 19:46
Hi @dorafmon for that capi_slots issue
Bob Fang
@dorafmon
Jan 03 2015 19:46
yes?
Kevin Modzelewski
@kmod
Jan 03 2015 19:46
can you try running python -c 'import sys; print sys.version' and posting the output?
also, what system are you running on?
Bob Fang
@dorafmon
Jan 03 2015 19:46
2.7.8 (default, Oct 20 2014, 15:05:19)
[GCC 4.9.1]
ubuntu 14.04
it is a digital ocean server
Kevin Modzelewski
@kmod
Jan 03 2015 19:47
Oh weird, I assumed you were on some non-ubuntu system
We have decent testing on 14.04 so I thought it would be ok
hmm ok...
Can you try running make clean then posting the output of make ext_python?
Bob Fang
@dorafmon
Jan 03 2015 19:48
λ UbuntuServer pyston → λ git tp* → make ext_python
cd ./test/test_extension; python setup.py build
running build
running build_ext
building 'basic_test' extension
creating build
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c basic_test.c -o build/temp.linux-x86_64-2.7/basic_test.o
creating build/lib.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/basic_test.o -o build/lib.linux-x86_64-2.7/basic_test.so
building 'descr_test' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c descr_test.c -o build/temp.linux-x86_64-2.7/descr_test.o
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/descr_test.o -o build/lib.linux-x86_64-2.7/descr_test.so
building 'slots_test' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c slots_test.c -o build/temp.linux-x86_64-2.7/slots_test.o
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/slots_test.o -o build/lib.linux-x86_64-2.7/slots_test.so
Daniel Agar
@dagar
Jan 03 2015 19:49
could it be ubuntu 14.10?
Bob Fang
@dorafmon
Jan 03 2015 19:49
Aha sorry
just checked
it is Your droplet's current kernel: Ubuntu 14.10 x64 vmlinuz-3.16.0-23-generic
Kevin Modzelewski
@kmod
Jan 03 2015 19:50
Cool one mystery solved :)
So it looks like 14.10 is compiling the extension modules with some different compiler flags
I'm not sure why we would trip the stack protector
Ok, can you try commenting out the entire capi_slots.py file, and uncomment a paragraph at a time until you get the error again?
When you run PYTHONPATH=test/test_extension/build/lib.linux-x86_64-2.7 python test/tests/capi_slots.py
Bob Fang
@dorafmon
Jan 03 2015 19:53
yep?
Kevin Modzelewski
@kmod
Jan 03 2015 19:54
And then let us know which is the first line that causes it to crash like that
Bob Fang
@dorafmon
Jan 03 2015 19:54
If I run that
the only out put I get is " stack smashing detected : python terminated
[1] 23717 abort (core dumped) PYTHONPATH=test/test_extension/build/lib.linux-x86_64-2.7 python"
Kevin Modzelewski
@kmod
Jan 03 2015 19:55
Do you get that if you comment out everything but the import slots_test line?
Bob Fang
@dorafmon
Jan 03 2015 19:56
let me try
If there is only import slots_test in the file, then it won’t crash
Kevin Modzelewski
@kmod
Jan 03 2015 19:57
Ok cool
Can you try uncommenting a paragraph at a time, then rerunning that command
and letting us know which paragraph causes the crash?
Bob Fang
@dorafmon
Jan 03 2015 19:58
sure
There are four parts in this file and the later two seems fine
the first two are both causing problems
This message was deleted
sorry
 for i in xrange(3):
     t = slots_test.SlotsTesterSeq(i + 5)
     print t, repr(t), t(), t[2]
     print hash(t), t < 1, t > 2, t != 3

# print slots_test.SlotsTesterSeq.__doc__
 print slots_test.SlotsTesterSeq.set_through_tpdict, slots_test.SlotsTesterSeq(5).set_through_tpdict

for i in xrange(3):
     t = slots_test.SlotsTesterMap(i + 5)
     print len(t), t[2]
     t[1] = 5
    del t[2]
Bob Fang
@dorafmon
Jan 03 2015 20:04
things after class C seems working
Kevin Modzelewski
@kmod
Jan 03 2015 20:05
ok can you try
t = slots_test.SlotsTesterSeq(5)
print "got here"
print t
Bob Fang
@dorafmon
Jan 03 2015 20:06
nah this snippet cause crash
Kevin Modzelewski
@kmod
Jan 03 2015 20:06
Does it print "got here"?
Bob Fang
@dorafmon
Jan 03 2015 20:06
no
Kevin Modzelewski
@kmod
Jan 03 2015 20:06
:/
ok
Bob Fang
@dorafmon
Jan 03 2015 20:07
Hmm… I am in the lab right now and I am going to head home. I will be backup onlie in a bit
Kevin Modzelewski
@kmod
Jan 03 2015 22:04
Ok I found it
used the wrong format character for PyArg_ParseTuple :(
Bob Fang
@dorafmon
Jan 03 2015 22:05
cool :smile:
what should I do?
Kevin Modzelewski
@kmod
Jan 03 2015 22:06
dropbox/pyston@88b6a09
Just pull and try again
Bob Fang
@dorafmon
Jan 03 2015 22:17
cool all tests passed
Kevin Modzelewski
@kmod
Jan 03 2015 23:09
awesome!