Andi Vajda schrieb:
> And last but not least, what version of gcc are you using ?

$ rpm -q gcc
gcc-4.1.2-42.el5
(default gcc for CentOS 5)

> What compile flags did you use when you built JCC itself ? (yes, Python's
> distutils sets most of these, what are they ?)

CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic
-fasynchronous-unwind-tables'

No other modifications besides setup.py:
INCLUDES = {
...
+    'linux2': ['/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/include',
+               '/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/include/linux'],
...

LFLAGS = {
+ 'linux2': ['-L/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386', '-ljava',
+               '-Wl'],
(I learned about the JCC_* environment variables after creating the rpm)

> Does switching from -O3 to -O2 or -O0 (no optimizations) make the problem go
> away ?

Yes, at least my test case is not reproducible with that anymore.
  JCC_CFLAGS="-O0" python setup.py develop --install-dir=...
for build jcc leads to compiler calls like this:
--------------------------------------
building 'jcc' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fPIC -I/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/include -I/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/include/linux -I_jcc -Ijcc/sources -I/usr/include/python2.4 -c jcc/sources/jcc.cpp -o build/temp.linux-i686-2.4/jcc/sources/jcc.o -DPYTHON -O0
--------------------------------------

Please note the -O2 in the beginning and the -I0 at the end. Is that correct? How can I get rid of the O2 if that is important?

Based on my findings, do you suspect a compiler bug? Or should I try to debug it further? For short term (next few days) I will try to rebuild my RPMs with -O0 and see if I can crash it anyway.

you wrote earlier:
> Since it's so easy for you to reproduce the bug, it'd be interesting to know
> what the value of the obj and id parameters are in JCCEnv::deleteGlobalRef()
> at the time of the crash.

I suspect I should run my app, attach gdb to the running app and set a break point just before the line where it crashes. Them I dump obj and id, right? Or should I modify the source so that these values are printed? If so, what should modify?

Thanks again,
fs


--
Felix Schwarz
Dipl.-Informatiker

Gubener Str. 38
10243 Berlin
Germany

www.schwarz.eu - software development and consulting

_______________________________________________
pylucene-dev mailing list
pylucene-dev@osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to