Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion `ssms.wrapped.find(callee) == ssms.wrapped.end()' failed. #12

Closed
qingmu-io opened this issue Apr 13, 2016 · 10 comments
Closed

Comments

@qingmu-io
Copy link

redex-all: opt/synth/Synth.cpp:558: void replace_wrappers(DexMethod_, DexCode_, WrapperMethods&): Assertion `ssms.wrapped.find(callee) == ssms.wrapped.end()' failed.
redex-all[0x415227]
/lib/x86_64-linux-gnu/libc.so.6(+0x36d40)[0x7fa0c02f5d40]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39)[0x7fa0c02f5cc9]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7fa0c02f90d8]
/lib/x86_64-linux-gnu/libc.so.6(+0x2fb86)[0x7fa0c02eeb86]
/lib/x86_64-linux-gnu/libc.so.6(+0x2fc32)[0x7fa0c02eec32]
redex-all[0x4f1b49]
redex-all[0x4f1e65]
redex-all[0x4f1f38]
redex-all[0x4f2a08]
redex-all[0x440cc5]
redex-all[0x40add6]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7fa0c02e0ec5]
redex-all[0x40bef7]
Aborted (core dumped)
Traceback (most recent call last):
File "/usr/local/bin/redex", line 779, in
run_redex(args)
File "/usr/local/bin/redex", line 735, in run_redex
dexen)
File "/usr/local/bin/redex", line 110, in run_pass
subprocess.check_call(args, shell=True)
File "/usr/lib/python3.4/subprocess.py", line 561, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'redex-all --apkdir /tmp/tmptomskmc3.redex_extracted_apk --outdir /tmp/tmpwset00_5.redex_dexen /tmp/tmpwset00_5.redex_dexen/dex0/classes.dex /tmp/tmpwset00_5.redex_dexen/dex1/classes2.dex /tmp/tmpwset00_5.redex_dexen/dex2/classes3.dex /tmp/tmpwset00_5.redex_dexen/dex3/classes4.dex /tmp/tmpwset00_5.redex_dexen/dex4/classes5.dex' returned non-zero exit status 134

@bertmaher
Copy link
Contributor

Ouch, looks like a nasty bug. Would you be able to share your APK with us to make debugging easier? In the meantime, you can disable the offending pass by creating a config file. If you follow the "Selecting Optimization Passes" section from our config how-to and remove SynthPass from the list, that'll get past the error.

@AnyMarvel
Copy link

I encountered the same problem, how can I get around this problem

subprocess.CalledProcessError: Command 'redex-all --apkdir /tmp/tmpitct8vym.redex_extracted_apk --outdir /tmp/tmpwvwxmixk.redex_dexen /tmp/tmpwvwxmixk.redex_dexen/dex0/classes.dex /tmp/tmpwvwxmixk.redex_dexen/dex1/classes2.dex /tmp/tmpwvwxmixk.redex_dexen/dex2/classes3.dex' returned non-zero exit status 134

@bertmaher
Copy link
Contributor

@dssljt If you're seeing the same assertion failure, you can try my suggestion above (create a configuration file that removes SynthPass).

@AnyMarvel
Copy link

i had remove SynthPass from he "Selecting Optimization Passes" section ,but can not get around this problem
opt/bridge/Bridge.cpp:292: void BridgeRemover::delete_unused_bridgees(): assertion `bridge->is_virtual()' failed.
bridge: public static com.alibaba.fastjson.parser.JavaBeanMapping.getGlobalInstance()Lcom/alibaba/fastjson/parser/ParserConfig;
bridgee: public static com.alibaba.fastjson.parser.JavaBeanMapping.getGlobalInstance()Lcom/alibaba/fastjson/parser/JavaBeanMapping;
redex-all[0x4150fa]
/lib/x86_64-linux-gnu/libc.so.6(+0x352f0)[0x7f8ad270b2f0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37)[0x7f8ad270b267]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f8ad270ceca]
redex-all[0x4150c6]
redex-all[0x49fe3f]
redex-all[0x4412b8]
redex-all[0x40ad83]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f8ad26f6a40]
redex-all[0x40bdc9]
Aborted (core dumped)
Traceback (most recent call last):
File "./redex", line 779, in
run_redex(args)
File "./redex", line 735, in run_redex
dexen)
File "./redex", line 110, in run_pass
subprocess.check_call(args, shell=True)
File "/usr/lib/python3.4/subprocess.py", line 561, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'redex-all --apkdir /tmp/tmpe1aygv1h.redex_extracted_apk --outdir /tmp/tmp4829hc0y.redex_dexen /tmp/tmp4829hc0y.redex_dexen/dex0/classes.dex /tmp/tmp4829hc0y.redex_dexen/dex1/classes2.dex /tmp/tmp4829hc0y.redex_dexen/dex2/classes3.dex' returned non-zero exit status 134

@bertmaher
Copy link
Contributor

That's an interesting one... you can disable BridgePass too to get past that failure, but I might be able to debug that one in short order. I'll take a deeper look tomorrow.

@bertmaher
Copy link
Contributor

Hey @247687009, I've been trying to repro that crash but have had no luck -- it's a scenario that "should be" impossible (but clearly isn't). Would you be willing to share your APK? If not, would you mind setting TRACE=SYNT:5 TRACEFILE=/tmp/trace in your environment and pasting the contents of /tmp/trace somewhere I can have a look? That would be an immense help in debugging. Thanks!

@ankurgupta001
Copy link

I am getting similar error

Assertion failed: (ssms.wrapped.find(callee) == ssms.wrapped.end()), function replace_wrappers, file opt/synth/Synth.cpp, line 560.
0 redex-all 0x0000000109e2a604 _Z15crash_backtracei + 52
1 libsystem_platform.dylib 0x00007fff9bac752a _sigtramp + 26
2 libsystem_malloc.dylib 0x00007fff938cbb10 szone_free_definite_size + 1938
3 libsystem_c.dylib 0x00007fff8c0436e7 abort + 129
4 libsystem_c.dylib 0x00007fff8c00adf8 basename + 0
5 redex-all 0x0000000109ed47bd _Z16replace_wrappersP9DexMethodP7DexCodeR14WrapperMethods + 1325
6 redex-all 0x0000000109ed5e52 _Z9transformRKNSt3__16vectorIP8DexClassNS_9allocatorIS2_EEEER14WrapperMethodsRK11SynthConfig + 130
7 redex-all 0x0000000109ed68d7 _ZN9SynthPass8run_passERNSt3__16vectorI10DexClassesNS0_9allocatorIS2_EEEER11ConfigFiles + 247
8 redex-all 0x0000000109e4963a _ZN11PassManager10run_passesERNSt3__16vectorI10DexClassesNS0_9allocatorIS2_EEEER11ConfigFiles + 378
9 redex-all 0x0000000109e1c287 main + 2263
10 libdyld.dylib 0x00007fff93d765ad start + 1
11 ??? 0x0000000000000006 0x0 + 6
Traceback (most recent call last):
File "/usr/local/bin/redex", line 788, in
run_redex(args)
File "/usr/local/bin/redex", line 744, in run_redex
dexen)
File "/usr/local/bin/redex", line 115, in run_pass
subprocess.check_call(args, shell=True)
File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 584, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/usr/local/bin/redex-all --apkdir /var/folders/87/7jw0ppy107n580fkz6rtfpyx0wy7h2/T/tmpsvxztm_d.redex_extracted_apk --outdir /var/folders/87/7jw0ppy107n580fkz6rtfpyx0wy7h2/T/tmpvrz5newg.redex_dexen /var/folders/87/7jw0ppy107n580fkz6rtfpyx0wy7h2/T/tmpvrz5newg.redex_dexen/dex0/classes.dex' returned non-zero exit status -6

@bertmaher
Copy link
Contributor

@ankurgupta001 , can you share the APK that exhibits this? I could solve this very quickly if I had a repro.

@ankurgupta001
Copy link

Please use the below link to download the apk.
https://drive.google.com/folderview?id=0B5oRvQlns1LvLW5nVVA1ckxWeVk&usp=sharing

@bertmaher
Copy link
Contributor

Sweet, thanks, that repros for me. I'll work on it tomorrow morning!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants