Closed robutcher closed 7 years ago
Hi robutcher,
Thanks for reporting. I will look at it soon. For the purpose of debugging, can you remove the “-t 15” parameter and try again?
Terry
On 10 Feb 2017, at 9:10 AM, robutcher notifications@github.com wrote:
1.call by jenkins pipeline shell like below: sh returnStatus: true, script: "lizard -f ${CHG_FILE} -W ${WHT_LIST} -l c -l cpp -t 15 > ${ANA_NEW}" some times liazard runs continuously, never stop;
2.call by groovy shell like below: def command = ‘’‘lizard -f chg.txt -W wht.txt -l c -l cpp -t 15 > rst.txt’‘’ def proc = command.execute() proc.waitFor() // Wait for the command to finish .waitFor() never stops, liazard always runs continuously, never stop;
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/terryyin/lizard/issues/176, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwJYnm84eKsMEJAI3AGm6Bvixz44tWuks5ra7kLgaJpZM4L84GT.
I have tried, with or without the “-t 15” parameter makes no difference.
Hi Robutcher,
OK. I will need to see which .c file caused the problem. Is it possible that you manually locate which file caused the problem by removing half of the content in “chg.txt” each time?
I will need that source code to investigate. If it’s not sensitive you can also send me all the code.
Br, Terry
On 10 Feb 2017, at 9:18 AM, robutcher notifications@github.com wrote:
I have tried, with or without the “-t 15” parameter makes no difference.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/terryyin/lizard/issues/176#issuecomment-278829675, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwJYh3Kwzmhvvp6nZ6S2DAm2OOHaFFcks5ra7rQgaJpZM4L84GT.
I have tried several times, it seems unrelated to some particular files; 1)call by groovy liazard always runs continuously, never stop, every times. Can you make a try?
[root@localhost service]# cat liz.gy
def command = '''lizard -f chg.txt > rst.txt''' def proc = command.execute() proc.waitFor()
[root@localhost ~]# ps -ef | grep lizard root 22114 1 0 Feb09 ? 00:00:00 /usr/local/bin/python /usr/local/bin/lizard -f chgfiles.txt -W whitelizard.txt -l c -l cpp -t 15 root 30535 30490 0 10:30 pts/0 00:00:03 /usr/local/bin/python /usr/local/bin/lizard -f chg.txt > rst.txt root 30593 30559 0 10:40 pts/2 00:00:00 grep lizard [root@localhost ~]#
2)call by jenkins pipeline, sometimes lizard runs continuously, it seems unrelated to some particular files, just sometimes.
Have you tried on command-line?
On Thu, Feb 9, 2017 at 6:39 PM, robutcher notifications@github.com wrote:
I have tried several times, it seem unrelated to some particular files; 1)call by groovy liazard always runs continuously, never stop; every times, can you make a try? 2)call by jenkins pipeline sometimes liazard runs continuously, seem unrelated to some particular files, just sometimes.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/terryyin/lizard/issues/176#issuecomment-278842109, or mute the thread https://github.com/notifications/unsubscribe-auth/ADMxKWNUTL8daZFrKqyURcczpRg4B5hAks5ra83PgaJpZM4L84GT .
I have tried on command-line, it runs ok.
So, the question is "What is different between cmd-line and Groovy call?". Environment? Any gotchas? Any Groovy warts to be aware of?
Lizard is probably agnostic how it is being called via the cmd-line entry.
On Thu, Feb 9, 2017 at 6:50 PM, robutcher notifications@github.com wrote:
I have tried on command-line, it runs ok.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/terryyin/lizard/issues/176#issuecomment-278843719, or mute the thread https://github.com/notifications/unsubscribe-auth/ADMxKddCjMMCpt8yUMHAWCERKbsf_5Caks5ra9CSgaJpZM4L84GT .
My understanding is with groovy, even removing “-t 15” won’t work. That means it’s not likely to be because of the threading.
Can you capture the stderr also in groovy?
On 10 Feb 2017, at 10:56 AM, Olzhas Rakhimov notifications@github.com wrote:
So, the question is "What is different between cmd-line and Groovy call?". Environment? Any gotchas? Any Groovy warts to be aware of?
Lizard is probably agnostic how it is being called via the cmd-line entry.
On Thu, Feb 9, 2017 at 6:50 PM, robutcher notifications@github.com wrote:
I have tried on command-line, it runs ok.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/terryyin/lizard/issues/176#issuecomment-278843719, or mute the thread https://github.com/notifications/unsubscribe-auth/ADMxKddCjMMCpt8yUMHAWCERKbsf_5Caks5ra9CSgaJpZM4L84GT .
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/terryyin/lizard/issues/176#issuecomment-278844463, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwJYrZYr-jdPX-aQYGFh72Mz6_DrITSks5ra9HOgaJpZM4L84GT.
println "return code: ${ proc.exitValue()}" println "stderr: ${proc.err.text}" println "stdout: ${proc.in.text}"
can't execute because the "proc.waitFor()" never stops, so I can't capture the stderr in groovy.
What about sh returnStatus: true, script: “python -mlizard -f ${CHG_FILE} -W ${WHT_LIST} -l c -l cpp -t 15 > ${ANA_NEW}”
On 10 Feb 2017, at 11:08 AM, robutcher notifications@github.com wrote:
println "return code: ${ proc.exitValue()}" println "stderr: ${proc.err.text}" println "stdout: ${proc.in.text}"
can't execute because the "proc.waitFor()" never stops, so I can't capture the stderr in groovy.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/terryyin/lizard/issues/176#issuecomment-278846067, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwJYqT9BqU59CbMOtDYIxMjNNwo9yC8ks5ra9SqgaJpZM4L84GT.
I think sh returnStatus: true, script: “lizard -f ${CHG_FILE} -W ${WHT_LIST} -l c -l cpp -t 15 > ${ANA_NEW}” equivalent to “/usr/local/bin/python /usr/local/bin/lizard ......"
It is still running, "root 22114 1 0 Feb09 ? 00:00:00 /usr/local/bin/python /usr/local/bin/lizard -f chgfiles.txt -W whitelizard.txt -l c -l cpp -t 15".
May this be relevant: http://stackoverflow.com/questions/5483830/process-waitfor-never-returns
On Thu, Feb 9, 2017 at 7:10 PM, Terry Yin notifications@github.com wrote:
What about sh returnStatus: true, script: “python -mlizard -f ${CHG_FILE} -W ${WHT_LIST} -l c -l cpp -t 15 > ${ANA_NEW}”
On 10 Feb 2017, at 11:08 AM, robutcher notifications@github.com wrote:
println "return code: ${ proc.exitValue()}" println "stderr: ${proc.err.text}" println "stdout: ${proc.in.text}"
can't execute because the "proc.waitFor()" never stops, so I can't capture the stderr in groovy.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/terryyin/lizard/issues/176#issuecomment-278846067>, or mute the thread https://github.com/notifications/unsubscribe-auth/ AAwJYqT9BqU59CbMOtDYIxMjNNwo9yC8ks5ra9SqgaJpZM4L84GT.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/terryyin/lizard/issues/176#issuecomment-278846334, or mute the thread https://github.com/notifications/unsubscribe-auth/ADMxKUaQc35sC4sjzR1qcUfzQ-w4FmHJks5ra9UsgaJpZM4L84GT .
bt of call by jenkins
0x00000038b0c0d6c0 in sem_wait () from /lib64/libpthread.so.0 Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.47.el6.x86_64 keyutils-libs-1.4-3.el6.x86_64 krb5-libs-1.9-22.el6.x86_64 libcom_err-1.41.12-11.el6.x86_64 libselinux-2.0.94-5.3.el6.x86_64 openssl-1.0.0-20.el6.x86_64 zlib-1.2.3-27.el6.x86_64 (gdb) bt
at /tmp/Python-2.7.13/Modules/_multiprocessing/semaphore.c:317
args=<value optimized out>, argcount=0, kws=0x7fd438002238, kwcount=0, defs=0x0, defcount=0, closure=0x7fd43e18eaa0)
at Python/ceval.c:3584
args=<value optimized out>, argcount=5, kws=0x7fd447c0a068, kwcount=0, defs=0x7fd43ec1e5b8, defcount=3, closure=0x0)
at Python/ceval.c:3584
at Objects/abstract.c:2547
args=<value optimized out>, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3584
at Objects/abstract.c:2547
at Objects/abstract.c:2547
at Objects/abstract.c:2547
---Type
args=<value optimized out>, argcount=1, kws=0x7fd447c0a068, kwcount=0, defs=0x0, defcount=0, closure=0x0)
at Python/ceval.c:3584
at Objects/abstract.c:2547
args=<value optimized out>, argcount=1, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3584
at Objects/abstract.c:2547
at Objects/abstract.c:2547
at Python/ceval.c:4221
bt of call by groovy
at Objects/stringobject.c:887
at Python/bltinmodule.c:1684
args=<value optimized out>, argcount=3, kws=0x7f13cb629420, kwcount=0, defs=0x0, defcount=0, closure=0x0)
at Python/ceval.c:3584
args=<value optimized out>, argcount=3, kws=0x1822588, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3584
args=<value optimized out>, argcount=0, kws=0x7f13d447ec88, kwcount=0, defs=0x7f13cb59af68, defcount=1, closure=0x0)
at Python/ceval.c:3584
args=<value optimized out>, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3584
at Python/ceval.c:669
globals=0x7f13d452b168, locals=0x7f13d452b168, closeit=1, flags=0x7fff0c3b5ea0) at Python/pythonrun.c:1376
globals=0x7f13d452b168, locals=0x7f13d452b168, closeit=1, flags=0x7fff0c3b5ea0) at Python/pythonrun.c:1362
flags=0x7fff0c3b5ea0) at Python/pythonrun.c:948
Sorry for not being able to help. Any updates? X
On 10 Feb 2017, at 11:36 AM, robutcher notifications@github.com wrote:
bt of call by groovy
0 0x00000038b04d8450 in __write_nocancel () from /lib64/libc.so.6
1 https://github.com/terryyin/lizard/issues/1 0x00000038b0470d43 in _IO_new_file_write () from /lib64/libc.so.6
2 https://github.com/terryyin/lizard/issues/2 0x00000038b04722f5 in _IO_new_do_write () from /lib64/libc.so.6
3 https://github.com/terryyin/lizard/issues/3 0x00000038b04709bd in _IO_new_file_xsputn () from /lib64/libc.so.6
4 https://github.com/terryyin/lizard/issues/4 0x00000038b0466dcd in fwrite () from /lib64/libc.so.6
5 https://github.com/terryyin/lizard/pull/5 0x000000000045c7b7 in string_print (op=, fp=0x38b079b780, flags=)
at Objects/stringobject.c:887
6 https://github.com/terryyin/lizard/issues/6 0x0000000000452cd3 in internal_print (op=0x7f13cb1c6918, fp=0x38b079b780, flags=1, nesting=0) at Objects/object.c:315
7 https://github.com/terryyin/lizard/issues/7 0x000000000042ffd9 in file_PyObject_Print (v=, f=0x7f13d4578150, flags=1) at Objects/fileobject.c:110
8 https://github.com/terryyin/lizard/issues/8 PyFile_WriteObject (v=, f=0x7f13d4578150, flags=1) at Objects/fileobject.c:2578
9 https://github.com/terryyin/lizard/issues/9 0x000000000049d80b in builtin_print (self=, args=0x7f13cb5d6790, kwds=)
at Python/bltinmodule.c:1684
10 https://github.com/terryyin/lizard/issues/10 0x00000000004aa6a8 in call_function (f=, throwflag=) at Python/ceval.c:4352
11 https://github.com/terryyin/lizard/issues/11 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2989
12 https://github.com/terryyin/lizard/issues/12 0x00000000004aaf47 in PyEval_EvalCodeEx (co=0x7f13cb6ec3b0, globals=, locals=,
args=, argcount=3, kws=0x7f13cb629420, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3584
13 https://github.com/terryyin/lizard/issues/13 0x00000000004a94b8 in fast_function (f=, throwflag=) at Python/ceval.c:4447
14 https://github.com/terryyin/lizard/issues/14 call_function (f=, throwflag=) at Python/ceval.c:4372
15 https://github.com/terryyin/lizard/issues/15 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2989
16 https://github.com/terryyin/lizard/issues/16 0x00000000004aaf47 in PyEval_EvalCodeEx (co=0x7f13cb64ee30, globals=, locals=,
args=, argcount=3, kws=0x1822588, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3584
17 https://github.com/terryyin/lizard/issues/17 0x00000000004a94b8 in fast_function (f=, throwflag=) at Python/ceval.c:4447
18 https://github.com/terryyin/lizard/issues/18 call_function (f=, throwflag=) at Python/ceval.c:4372
19 https://github.com/terryyin/lizard/issues/19 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2989
20 https://github.com/terryyin/lizard/issues/20 0x00000000004aaf47 in PyEval_EvalCodeEx (co=0x7f13cb5cb830, globals=, locals=,
args=, argcount=0, kws=0x7f13d447ec88, kwcount=0, defs=0x7f13cb59af68, defcount=1, closure=0x0) at Python/ceval.c:3584
21 https://github.com/terryyin/lizard/issues/21 0x00000000004a94b8 in fast_function (f=, throwflag=) at Python/ceval.c:4447
22 https://github.com/terryyin/lizard/issues/22 call_function (f=, throwflag=) at Python/ceval.c:4372
23 https://github.com/terryyin/lizard/issues/23 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2989
24 https://github.com/terryyin/lizard/issues/24 0x00000000004aaf47 in PyEval_EvalCodeEx (co=0x7f13d4241830, globals=, locals=,
args=, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3584
25 https://github.com/terryyin/lizard/pull/25 0x00000000004ab052 in PyEval_EvalCode (co=, globals=, locals=)
at Python/ceval.c:669
26 https://github.com/terryyin/lizard/pull/26 0x00000000004cc1ae in run_mod (fp=0x1704810, filename=0x7fff0c3b7584 "/usr/local/bin/lizard", start=,
globals=0x7f13d452b168, locals=0x7f13d452b168, closeit=1, flags=0x7fff0c3b5ea0) at Python/pythonrun.c:1376
27 https://github.com/terryyin/lizard/pull/27 PyRun_FileExFlags (fp=0x1704810, filename=0x7fff0c3b7584 "/usr/local/bin/lizard", start=,
globals=0x7f13d452b168, locals=0x7f13d452b168, closeit=1, flags=0x7fff0c3b5ea0) at Python/pythonrun.c:1362
28 https://github.com/terryyin/lizard/issues/28 0x00000000004cc3d7 in PyRun_SimpleFileExFlags (fp=0x1704810, filename=0x7fff0c3b7584 "/usr/local/bin/lizard", closeit=1,
flags=0x7fff0c3b5ea0) at Python/pythonrun.c:948
29 https://github.com/terryyin/lizard/issues/29 0x0000000000415112 in Py_Main (argc=, argv=) at Modules/main.c:640
30 https://github.com/terryyin/lizard/pull/30 0x00000038b041ecdd in __libc_start_main () from /lib64/libc.so.6
31 https://github.com/terryyin/lizard/issues/31 0x00000000004141f9 in _start ()
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/terryyin/lizard/issues/176#issuecomment-278849254, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwJYhZj864kw2GaB7MUZLoOIHLyYQLoks5ra9tAgaJpZM4L84GT.
There hasn't been much activity here. Let me close the issue for now.
1.call by jenkins pipeline shell like below: sh returnStatus: true, script: "lizard -f ${CHG_FILE} -W ${WHT_LIST} -l c -l cpp -t 15 > ${ANA_NEW}" some times liazard runs continuously, never stop;
2.call by groovy shell like below: def command = ‘’‘lizard -f chg.txt -W wht.txt -l c -l cpp -t 15 > rst.txt’‘’ def proc = command.execute() proc.waitFor() // Wait for the command to finish .waitFor() never stops, liazard always runs continuously, never stop;