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

abort in zmq::tcp_listener_t::accept #3319

Closed
hgourvest opened this issue Dec 5, 2018 · 6 comments
Closed

abort in zmq::tcp_listener_t::accept #3319

hgourvest opened this issue Dec 5, 2018 · 6 comments

Comments

@hgourvest
Copy link

last commit id: f615b8f

It seem to be an unexpected error code that is not in this list:

    errno_assert (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR
                  || errno == ECONNABORTED || errno == EPROTO
                  || errno == ENOBUFS || errno == ENOMEM || errno == EMFILE
                  || errno == ENFILE);

unfotunately the error code is not logged. what should I do to log the error code?
And what is the point to make it crash in this case?

The fist line is quite interesting and could be related:

2018-12-05 14:35:15.182 1620-1620/? I/wificond: Received external scan result notification from kernel.
2018-12-05 14:35:15.699 5811-5855/? A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 5855 (pool-2-thread-1), pid 5811 (com.testing.app)
2018-12-05 14:35:15.838 6517-6517/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2018-12-05 14:35:15.838 6517-6517/? A/DEBUG: LineageOS Version: '15.1-20181204-NIGHTLY-oneplus2'
2018-12-05 14:35:15.839 6517-6517/? A/DEBUG: Build fingerprint: 'OnePlus/OnePlus2/OnePlus2:6.0.1/MMB29M/1447858500:user/release-keys'
2018-12-05 14:35:15.839 6517-6517/? A/DEBUG: Revision: '0'
2018-12-05 14:35:15.839 6517-6517/? A/DEBUG: ABI: 'arm64'
2018-12-05 14:35:15.839 6517-6517/? A/DEBUG: pid: 5811, tid: 5855, name: pool-2-thread-1 >>> com.testing.app <<<
2018-12-05 14:35:15.839 6517-6517/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
2018-12-05 14:35:15.842 6517-6517/? A/DEBUG: x0 0000000000000000 x1 00000000000016df x2 0000000000000006 x3 0000000000000008
2018-12-05 14:35:15.842 6517-6517/? A/DEBUG: x4 0000000000000029 x5 0000000000000029 x6 0000000000000029 x7 000000000000000a
2018-12-05 14:35:15.843 6517-6517/? A/DEBUG: x8 0000000000000083 x9 0000000010000000 x10 0000006feab50280 x11 0000000000000001
2018-12-05 14:35:15.843 6517-6517/? A/DEBUG: x12 0000007085ac04c0 x13 00000000fffffffc x14 0000000000000000 x15 0000000000000003
2018-12-05 14:35:15.843 6517-6517/? A/DEBUG: x16 000000558c823fa8 x17 0000007085a7b63c x18 0000007085ae9000 x19 00000000000016b3
2018-12-05 14:35:15.843 6517-6517/? A/DEBUG: x20 00000000000016df x21 0000000000000083 x22 0000006feab51588 x23 0000006feab502e8
2018-12-05 14:35:15.843 6517-6517/? A/DEBUG: x24 0000006feab51588 x25 0000006feab50418 x26 0000007002909220 x27 0000000000000058
2018-12-05 14:35:15.843 6517-6517/? A/DEBUG: x28 0000000000000003 x29 0000006feab502c0 x30 0000007085a2f72c
2018-12-05 14:35:15.843 6517-6517/? A/DEBUG: sp 0000006feab50280 pc 0000007085a2f754 pstate 0000000060000000
2018-12-05 14:35:15.861 6517-6517/? A/DEBUG: backtrace:
2018-12-05 14:35:15.861 6517-6517/? A/DEBUG: #00 pc 000000000001d754 /system/lib64/libc.so (abort+120)
2018-12-05 14:35:15.861 6517-6517/? A/DEBUG: #1 pc 00000000000b073c /data/app/com.testing.app-p-Fr2JBBHTezqB2hPV72yg==/lib/arm64/libzeromq.so (zmq::zmq_abort(char const*)+8)
2018-12-05 14:35:15.861 6517-6517/? A/DEBUG: #2 pc 00000000000e20f4 /data/app/com.testing.app-p-Fr2JBBHTezqB2hPV72yg==/lib/arm64/libzeromq.so (zmq::tcp_listener_t::accept()+416)
2018-12-05 14:35:15.861 6517-6517/? A/DEBUG: #3 pc 00000000000e1d24 /data/app/com.testing.app-p-Fr2JBBHTezqB2hPV72yg==/lib/arm64/libzeromq.so (zmq::tcp_listener_t::in_event()+28)
2018-12-05 14:35:15.861 6517-6517/? A/DEBUG: #4 pc 00000000000b0440 /data/app/com.testing.app-p-Fr2JBBHTezqB2hPV72yg==/lib/arm64/libzeromq.so (zmq::epoll_t::loop()+200)
2018-12-05 14:35:15.861 6517-6517/? A/DEBUG: #5 pc 00000000000e25bc /data/app/com.testing.app-p-Fr2JBBHTezqB2hPV72yg==/lib/arm64/libzeromq.so
2018-12-05 14:35:15.861 6517-6517/? A/DEBUG: #6 pc 0000000000068e90 /system/lib64/libc.so (__pthread_start(void*)+36)
2018-12-05 14:35:15.861 6517-6517/? A/DEBUG: #7 pc 000000000001ebe4 /system/lib64/libc.so (__start_thread+68)

@hgourvest
Copy link
Author

I compile for Android Api level 16, and I need to undef these compiler options:
#define ZMQ_HAVE_ANDROID 1
#undef ZMQ_HAVE_PTHREAD_SET_AFFINITY
#undef ZMQ_HAVE_TIPC
#undef ZMQ_HAVE_GETRANDOM
#undef ZMQ_HAVE_SOCK_CLOEXEC
#undef ZMQ_IOTHREAD_POLLER_USE_EPOLL_CLOEXEC

@hgourvest
Copy link
Author

I got it: EINVAL = 22

@hgourvest
Copy link
Author

The problem occur when I desactivate and reactivate the wifi on my phone, if I add EINVAL to the list it not crash anymore, but I don't know it is the right thing to do. Any advice?

@hgourvest
Copy link
Author

BTW this is the Android permissions I use:


@hgourvest
Copy link
Author

android.permission.INTERNET
android.permission.ACCESS_NETWORK_STATE
android.permission.ACCESS_WIFI_STATE

@hgourvest
Copy link
Author

fixed in his merge #3326

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

1 participant