curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

RE: [Help Requested] Test Differences on 64-bit vs. 32-bit NonStop

From: Randall via curl-library <curl-library_at_lists.haxx.se>
Date: Sat, 10 Sep 2022 19:43:04 -0400

>From: Daniel Stenberg <daniel_at_haxx.se>
>On Sat, 10 Sep 2022, rsbecker_at_nexbridge.com wrote:
>
>>> $ ./runtests.pl -g 9
>>
>> This gives me:
>>
>> test 0009...[HTTP RFC1867-type formposting] Can't exec "--directory":
>> No such file or directory at ./runtests.pl line 624.
>>
>> 9: protocol FAILED!
>>
>> To debug, I have to run with "run -debug ...". It is still gdb under
>> the covers but getting there is harder. I have set the curl object to
>> generate a snapshot on abend, which is not happening. What is the
>> actual command to run?
>
>runtests.pl -g creates a file called log/gdbcmd with gdb commands then it
runs
>
> gdb --directory ./libtest ../src/curl -x log/gdbcmd
>
>For test 9, the gdbcmd file gets this content:
>
> set args --output log/curl9.out --include --trace-ascii log/trace9
--trace-time
>http://127.0.0.1:43463/we/want/9 -F name=daniel -F tool=curl -F
>file=_at_log/test9.txt
> show args
>

Had to McGyver this, into
cd ./libtest
run debug ../../src/curl --output ../log/curl9.out --include --trace-ascii
../log/trace9 --trace-time http://127.0.0.1:43463/we/want/9 -F name=daniel
-F tool=curl -F file=_at_../log/test9.txt

With that, the stack trace on SIGSEGV is:

Process (2,981) received non-deferrable signal SIGSEGV (number: 11)
(xInspect 2,981):bt
#0 0xfffffffff11d9ccc in memcpyHP ()
#1 0xfffffffff11ddb74 in memcpy ()
#2 0x7fe26435 in ossl_cipher_fillblock (buf=<value optimized out>,
    buflen=<value optimized out>, blocksize=<value optimized out>,
    in=0x6fffee10, inlen=<value optimized out>)
    at
/home/ituglib/randall/openssl-3.0/providers/implementations/ciphers/cipherco
mmon_block.c:68
#3 0x7fe2519b in ossl_cipher_generic_block_update (vctx=0x1000538f0,
    out=0x6fffef60 "\360\002\003", outl=<value optimized out>, outsize=64,
    in=0x6fffef90 "", inl=48)
    at
/home/ituglib/randall/openssl-3.0/providers/implementations/ciphers/cipherco
mmon.c:329
#4 0x7fc9d379 in EVP_EncryptUpdate (ctx=<value optimized out>,
    out=<value optimized out>, outl=0x6fffefc4, in=<value optimized out>,
    inl=<value optimized out>)
    at /home/ituglib/randall/openssl-3.0/crypto/evp/evp_enc.c:649
#5 0x7fc9d280 in EVP_CipherUpdate (ctx=<value optimized out>,
    out=<value optimized out>, outl=<value optimized out>,
    in=<value optimized out>, inl=<value optimized out>)
    at /home/ituglib/randall/openssl-3.0/crypto/evp/evp_enc.c:425
#6 0x7fe1294e in ctr_update (drbg=<value optimized out>,
    in1=<value optimized out>, in1len=<value optimized out>,
    in2=<value optimized out>, in2len=<value optimized out>,
---Type <return> to continue, or q <return> to quit---
    nonce=<value optimized out>, noncelen=0)
    at
/home/ituglib/randall/openssl-3.0/providers/implementations/rands/drbg_ctr.c
:280
#7 0x7fe12c23 in drbg_ctr_instantiate (drbg=<value optimized out>,
    entropy=<value optimized out>, entropylen=<value optimized out>,
    nonce=<value optimized out>, noncelen=<value optimized out>,
    pers=<value optimized out>, perslen=29)
    at
/home/ituglib/randall/openssl-3.0/providers/implementations/rands/drbg_ctr.c
:321
#8 0x7fe10584 in ossl_prov_drbg_instantiate (drbg=0x100030350,
    strength=<value optimized out>,
    prediction_resistance=<value optimized out>,
    pers=0x7ffef640 "OpenSSL NIST SP 800-90A DRBG", perslen=29)
    at
/home/ituglib/randall/openssl-3.0/providers/implementations/rands/drbg.c:454
#9 0x7fe118da in drbg_ctr_instantiate_wrapper (vdrbg=0x100030350,
    strength=<value optimized out>,
    prediction_resistance=<value optimized out>, pstr=<value optimized out>,
    pstr_len=<value optimized out>, params=<value optimized out>)
    at
/home/ituglib/randall/openssl-3.0/providers/implementations/rands/drbg_ctr.c
:336
#10 0x7fca7e24 in evp_rand_instantiate_locked (ctx=<value optimized out>,
    strength=<value optimized out>,
---Type <return> to continue, or q <return> to quit---
    prediction_resistance=<value optimized out>, pstr=<value optimized out>,
    pstr_len=<value optimized out>, params=<value optimized out>)
    at /home/ituglib/randall/openssl-3.0/crypto/evp/evp_rand.c:505
#11 0x7fca7ea0 in EVP_RAND_instantiate (ctx=0x1000302f0,
    strength=<value optimized out>,
    prediction_resistance=<value optimized out>, pstr=<value optimized out>,
    pstr_len=<value optimized out>, params=<value optimized out>)
    at /home/ituglib/randall/openssl-3.0/crypto/evp/evp_rand.c:518
#12 0x7fd25a62 in rand_new_drbg (libctx=<value optimized out>,
    parent=<value optimized out>, reseed_interval=256,
    reseed_time_interval=3600, use_df=1)
    at /home/ituglib/randall/openssl-3.0/crypto/rand/rand_lib.c:597
#13 0x7fd24b6b in RAND_get0_primary (ctx=<value optimized out>)
    at /home/ituglib/randall/openssl-3.0/crypto/rand/rand_lib.c:644
#14 0x7fd24dd8 in RAND_status ()
    at /home/ituglib/randall/openssl-3.0/crypto/rand/rand_lib.c:300
#15 0x700ea82d in rand_enough ()
#16 0x700ea891 in ossl_seed ()
#17 0x700e9856 in ossl_random ()
#18 0x70097728 in Curl_ssl_random ()
#19 0x70063639 in randit ()
#20 0x70063808 in Curl_rand ()
#21 0x7006395f in Curl_rand_hex ()
#22 0x700520a3 in curl_mime_init ()
#23 0x70021ff2 in tool2curlmime ()
#24 0x70037833 in single_transfer ()
#25 0x7003ccb6 in transfer_per_config ()
#26 0x7003bf0b in create_transfer ()
#27 0x7003c5e3 in serial_transfers ()
#28 0x7003cd63 in run_all_transfers ()
#29 0x7003d1e1 in operate ()
#30 0x70032e9b in main ()
#31 0x7001ba00 in _MAIN () at \BLPROD.$RTAL.T8432ACM.CMAIN64C:52

I am using the hardware randomizer source on x86. SSL 3.0.4 (in this case)
tests 100% correctly.

-Randall

-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2022-09-11