-
Notifications
You must be signed in to change notification settings - Fork 10
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
Panic Cause: null pointer dereference in c4socket_gotHTTPResponse #54
Comments
So even if there are some bugs in C++ or in Rust part the |
It should be SIGABRT (signal 6) because of assert if c4socket is null pointer |
Have you an idea where the nullpointer dereference is thrown? |
|
Can you remind me why did you implement your own transport layer and not use the BuiltInWebSocket ? To support the wss protocol ? thanks |
If I do that :
that say it's in the delegate function ? |
Because the crate is designed to use in Rust application. The tokio by default run N (where N is number of logical cores) threads with epoll event loops, One "network runtime" is more simple to control.
Not sure about this, shared library can be mapped to any address, If you can provide something to reproduce problem on my side I will help you to fix. On android you can run binary via: adb push "$EXE" "/data/local/tmp/$EXE_NAME"
adb shell "chmod 755 /data/local/tmp/$EXE_NAME"
adb shell "cd /data/local/tmp/ && RUST_LOG=debug /data/local/tmp/$EXE_NAME" |
The problem of the problem is that occurred rarely. The new news is that occurred also on desktop macos (10.15) and I think at the same place. Our app is running with electronjs where the native lib is called via ffi-napi. Rarely the app cashed, the crashdump indicate :
When i used the atos command line to know where the crash had take place, I found that :
and
Curiously it seem to be the same place as on mobile. I tried to reproduce it with a stress test which loop to start replication and stop replication but I never had the crash. I will continue to try... If you have some ideas I'm all hears |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Today I have the save problem in dev env. Sometimes my app crash but I never analyzed the dump. Today I did it and :
It's better clear to investigate |
More clues, we have this error at same time :
|
Last clues and I think very interesting !
We can see that between the ws_open entry and the call to c4socket_gotHTTPResponse the BLIPIO _closed is called :
. And so the release(this); which release all transitive pointer I think |
We can reproduce the problem with two restart_replicator() successively |
I just submitted a PR #55 |
Funny thing, current master and BuiltInWebSocket have the similar problem:
|
Hi,
During our test on android we have sometimes this issue on android :
When I look the code of c4socket_gotHTTPResponse (c4Socket.cc) I can see a try catch but I don't know if it catch a NPE ?
In cbl-rust this function is used in repl_transport.rs like this :
My first question is, is it possible that sock_id can be null ?
Second question, do you know if checking that sock_id is not a null pointer could be a good idea ?
The text was updated successfully, but these errors were encountered: