Open DavidCap opened 4 months ago
How often does the crash happen? What android version are you using? I'm surprised at this stack trace, I thought fdsan was purely for C/C++ code and java should not be able to trigger it. In addition, close is called from JDK itself, which makes it even more confusing.
almost 8% android version:Harmony OS 4.0.0
by the way,i have another crash。 android version Android 13,level 33
ROM XiaoMi/MIUI
Crash Log:
2
3 java: 4 java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230) 5 java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212) 6 java.net.Socket.connect(Socket.java:646) 7 org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:473) 8 java.lang.Thread.run(Thread.java:1012)
i don;t konw why, and how to fix it. express heartfelt thanks;
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() { @Override public void run() { //Log.d("DEBUG", "still checking websocket"); try { missed_heartbeats += 1; Log.d("heartbeat", String.valueOf(missed_heartbeats)); if (missed_heartbeats > 2) { Log.d("DEBUG","heartbeat"); missed_heartbeats = 0; if (mWebSocketClient != null) { new Thread(new Runnable() { public void run() { // a potentially time consuming task try { mWebSocketClient.reconnect(); } catch (Exception e){ Log.d("DEBUG","ERROR RECONNECTING"); e.printStackTrace(); } } }).start(); }
}
} finally {
// 100% guarantee that this always happens, even if
// your update method throws an exception
mHandlerl.postDelayed(mStatusCheckerl, mIntervall);
}
}
};
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 strace -yy -f -e trace=%desc
and post the output here.
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]
Environment(please complete the following information):
Additional context