Menu

A test script cause a Segmentation fault

Help
2012-06-11
2013-05-04
  • Yuzhou Liang

    Yuzhou Liang - 2012-06-11

    This test script will cause a Segmentation fault.

    [user@host httest]$ cat test.htt 
    BLOCK:LUA test1
      print("\nI'm in test1")
    END
    BLOCK:LUA test2 arg1
      print("\nI'm in test2, arg1="..arg1)
    END
    CLIENT
      test1
      test2 "test2arg"
      test1
    END
    [user@host httest]$ httest test.htt 
    run test.htt                                                                        
    CLT0-0 start ...
    test1
    I'm in test1
    test2 "test2arg"
    I'm in test2, arg1=test2arg
    test1Segmentation fault
    [user@host httest]$ httest --version
    httest 2.2.5
    Copyright (C) 2006 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    Written by Christian Liesch
    [user@host httest]$
    
     
  • christian liesch

    thanks for reporting this bug, I will investigate. I found more problems in 2.2.5 and working on the next release 2.2.6. I hope I can fix your segmentation fault too. But first I have to reproduce. Do you working on a 64 bit maschine?

    regards

     
  • Yuzhou Liang

    Yuzhou Liang - 2012-06-11

    Yes, I working on Cent OS 6.2 64bit. And configure httest with "./configure -enable-lua-module" option.

     
  • christian liesch

    Perfect! I can reproduce this segfault even on my Eee :) Will take a look on the way home. This will be fixed in the next release.

     
  • christian liesch

    Fixed! But have more stuff to fix. I did upload a snapshot which you can find here https://sourceforge.net/projects/htt/files/htt2.2/httest-snapshot/

    New release will coming soon.

     
  • Yuzhou Liang

    Yuzhou Liang - 2012-06-12

    Thanks for your quick response.
    The snapshot version can fix this issue in debian 32bit linux. But, compile failed in Cent OS 64bit.

    [yuzhou@host httest-snapshot]$ make
    Making all in src
    make[1]: Entering directory `/opt/home/yuzhou/dev/httest/httest-snapshot/src'
    /bin/sh ../libtool --tag=CC   --mode=link gcc  -pthread  -g -O2  -I/usr/include/apr-1   -I/usr/include/apr-1       -o httest httest.o file.o socket.o regex.o util.o replacer.o ssl.o worker.o module.o transport.o store.o eval.o modules.o ssl_module.o tcp_module.o skeleton_module.o date_module.o coder_module.o math_module.o sys_module.o binary_module.o udp_module.o socks_module.o websocket_module.o dbg_module.o perf_module.o lua_crypto.o lua_module.o -lssl -lcrypto  -lapr-1   -L/usr/lib64 -laprutil-1   -lpthread  -lldap -llber -llber -ldb-4.7    -lexpat -ldb-4.7    -lpcre -lz -lm  -llua
    libtool: link: gcc -pthread -g -O2 -I/usr/include/apr-1 -I/usr/include/apr-1 -o httest httest.o file.o socket.o regex.o util.o replacer.o ssl.o worker.o module.o transport.o store.o eval.o modules.o ssl_module.o tcp_module.o skeleton_module.o date_module.o coder_module.o math_module.o sys_module.o binary_module.o udp_module.o socks_module.o websocket_module.o dbg_module.o perf_module.o lua_crypto.o lua_module.o  -lssl -lcrypto /usr/lib64/libapr-1.so -L/usr/lib64 /usr/lib64/libaprutil-1.so -lpthread -lldap -llber -lexpat -ldb-4.7 -lpcre -lz -lm -llua -pthread -Wl,-rpath -Wl,/usr/lib64 -Wl,-rpath -Wl,/usr/lib64
    httest.o: In function `command_LOOP':
    /home/yuzhou/dev/httest/httest-snapshot/src/httest.c:971: undefined reference to `apr_time_from_msec'
    perf_module.o: In function `block_PERF_RAMPUP':
    /home/yuzhou/dev/httest/httest-snapshot/src/perf_module.c:836: undefined reference to `apr_time_from_msec'
    collect2: ld returned 1 exit status
    make[1]: *** [httest] Error 1
    make[1]: Leaving directory `/opt/home/yuzhou/dev/httest/httest-snapshot/src'
    make: *** [all-recursive] Error 1
    [yuzhou@host httest-snapshot]$
    
     
  • christian liesch

    apr_time_from_msec is an APR function. Maybe you have an older version of APR than me?

    > apr-1-config --version
    1.4.2
    [code]
    I do have the same problem on my workstation at my workplace, there I use a Suse Linux also 64-bit. I uploaded a new snapshot. More fixes will coming soon, I inspect httest with gcov, gprof and valgrind.
    Thanks for reporting.
    
     
  • Yuzhou Liang

    Yuzhou Liang - 2012-06-12

    I use 1.3.9 version APR.
    $ apr-1-config -version
    1.3.9

     
  • Yuzhou Liang

    Yuzhou Liang - 2012-06-12

    The new snapshot worked! Thanks a lot.

     

Log in to post a comment.