Opened 2 weeks ago

Last modified 2 weeks ago

#32340 new defect

[Android] FAIL src/test/test_process_slow.c:240: assert(smartlist_len(process_data->stdout_data) OP_EQ 12): 2 vs 12

Reported by: eighthave Owned by:
Priority: Medium Milestone: Tor: 0.4.3.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: Android 043-should
Cc: n8fr8, ahf Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Running the test-slow suite fails every time with this error on 0.4.1.x, 0.4.2.x, and master:

slow/process/callbacks: 
  FAIL src/test/test_process_slow.c:240: assert(smartlist_len(process_data->stdout_data) OP_EQ 12): 2 vs 12
  [callbacks FAILED]

The full build/test log is here:
https://gitlab.com/eighthave/tor/-/jobs/336701282

To try this yourself, it'll be easiest using the Guardian Project fork, which is in sync on GitHub and GitLab:

I looked into it a bit, but couldn't quite figure out what was being tested there. Is it Tor's "smartlist" functions? stdin/stdout/stderr have annoying, arbitrary restrictions in Android, so it could be related to that. For example, "native" code loaded from a shared library will have stdin/stdout/stderr redirected to /dev/null, while in Java code, it is reachable. There is a related example on #32036

Child Tickets

Change History (4)

comment:1 Changed 2 weeks ago by eighthave

Here's all the steps that fail from that test:

slow/process/callbacks: 
  FAIL src/test/test_process_slow.c:240: assert(smartlist_len(process_data->stdout_data) OP_EQ 12): 2 vs 12
  FAIL src/test/test_process_slow.c:243: assert(smartlist_len(process_data->stderr_data) OP_EQ 3): 0 vs 3
  FAIL src/test/test_process_slow.c:245: assert(process_data->exit_code OP_EQ 0): 256 vs 0
  FAIL src/test/test_process_slow.c:251: assert(smartlist_get(process_data->stdout_data, 0) OP_EQ argv0_expected): <<NULL>> vs <argv[0] = '/home/hans/code/guardianproject/tor-android/external/tor/src/test/test-process'>
  FAIL src/test/test_process_slow.c:279: assert(smartlist_get(process_data->stderr_data, 0) OP_EQ "Output on stderr"): <<NULL>> vs <Output on stderr>
  [callbacks FAILED]

Here's how I ran it easily:

$ git clone https://gitlab.com/eighthave/tor-android
$ cd tor-android/external
$ make APP_ABI=x86
# start Android x86 or x86_64 emulator
$ rm -f tor-build-stamp ; make APP_ABI=x86 \
    && adb -e push test/x86/test-slow /data/local/tmp/ \
    && adb -e shell /data/local/tmp/test-slow

comment:2 Changed 2 weeks ago by nickm

Cc: ahf added
Keywords: 043-should added
Milestone: Tor: 0.4.3.x-final
Summary: FAIL src/test/test_process_slow.c:240: assert(smartlist_len(process_data->stdout_data) OP_EQ 12): 2 vs 12[Android] FAIL src/test/test_process_slow.c:240: assert(smartlist_len(process_data->stdout_data) OP_EQ 12): 2 vs 12

comment:3 Changed 2 weeks ago by eighthave

And one intermittent failure:

hs_service/service_intro_point: [forking] 
  FAIL src/test/test_hs_service.c:696: assert(ip->time_to_expire OP_GE now + INTRO_POINT_LIFETIME_MIN_SECONDS - 500): 1572508083 vs 1572508798
  [service_intro_point FAILED]

https://gitlab.com/eighthave/tor/-/jobs/337312613

comment:4 Changed 2 weeks ago by eighthave

I can't quite pin down what is failing here, but it seems to happen in builds done with NDK r17b but not r20:

slow/crypto/fuzz_donna/ed25519_donna: [forking] OK
slow/crypto/fuzz_donna/ed25519_ref10: [forking] OK
slow/process/callbacks: $ exit $EXITVALUE
ERROR: Job failed: exit code 1

https://gitlab.com/guardianproject/tor/-/jobs/337775417

Note: See TracTickets for help on using tickets.