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
Android crash due to FD sanitizer #1388
Comments
How often does the crash happen? |
almost 8% by the way,i have another crash。 ROM Crash Log: i don;t konw why, and how to fix it. |
I cannot help, I dont have a HUAWEI/XiaoMi. Since no one else has a problem, I think it is related to the ROM and we cannot help you here. |
Hi there, glad someone is having the same issues. This error is happening in every version (currently having 1.5.3 and 1.4.0 in two different apps). Copy and pasting fdsan: attempted to close file descriptor 97, expected to be owned by SocketImpl 0xc908ae3, actually unowned pid: 0, tid: 19036 >>> es.las40.guinyote <<< backtrace: Another one pid: 0, tid: 4182 >>> es.las40.guinyote <<< backtrace: And another one Copy and pasting what maybe is causing the trouble but im not sure I manually check if websocket connection is lost after a few heartbeats and if missed_heartbeats > 2 try to reconnect Runnable mStatusCheckerl = new Runnable() {
It's very difficult to debug this fdsan error but i have like 1% errors due to this. It's affecting to users with Android version 12,13 and 14. |
One possible explanation is that some other native library is corrupting your file descriptor, which is being detected by other unrelated parts of the code. I've tried everything but I am unable to reproduce on Android emulator using this library alone. This makes sense since the JDK platform is expected to handle the FD tags transparently. If you have any native libraries in your app, please list them here. This would also explain why we have only 2 reports of this so far. If you can send me an example app which reproduces the issue, I could debug this further (if you want to send it privately, mail it to frfilips@gmail.com). Otherwise I cannot debug this. Alternatively, you can try to reproduce the crash while running with |
Describe the bug
Crash happen
Version:1.5.5
To Reproduce
Example application to reproduce the issue
Expected behavior
Debug log
SIGABRT
0x285e00006d4f
#00 pc 000000000008dfb0 /apex/com.android.runtime/lib64/bionic/libc.so (_ZL11fdsan_errorPKcz+556) [arm64-v8a::a85ef5fb74e0282813cd1edb10854577]
#1 pc 000000000008dc98 /apex/com.android.runtime/lib64/bionic/libc.so (android_fdsan_close_with_tag+716) [arm64-v8a::a85ef5fb74e0282813cd1edb10854577]
#2 pc 000000000002399c /apex/com.android.art/lib64/libjavacore.so [arm64-v8a::6f15b08a88680707caeb381d9e0bbc2d]
#3 pc 00000000000131f0 /apex/com.android.art/javalib/arm64/boot-core-libart.oat [arm64-v8a::93652ebf96d750c1b4621d5403cee3e0]
java:
libcore.io.ForwardingOs.close(ForwardingOs.java:179)
libcore.io.BlockGuardOs.close(BlockGuardOs.java:113)
libcore.io.ForwardingOs.close(ForwardingOs.java:179)
libcore.io.IoBridge.closeAndSignalBlockedThreads(IoBridge.java:313)
java.net.PlainSocketImpl.socketClose0(PlainSocketImpl.java:249)
java.net.AbstractPlainSocketImpl.socketClose(AbstractPlainSocketImpl.java:764)
java.net.AbstractPlainSocketImpl.close(AbstractPlainSocketImpl.java:582)
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:409)
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
java.net.Socket.connect(Socket.java:621)
org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:475)
java.lang.Thread.run(Thread.java:930)
Environment(please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: