-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix Historical Data Unit Test random failure #2342
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nice! Maybe we can eventually add a “big kernel lock” to the server. I will propose something... |
``` 24: ==26126==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x2b44ecb44890 at pc 0x0000005470bc bp 0x2b44ecb3ee00 sp 0x2b44ecb3edf8 24: WRITE of size 8 at 0x2b44ecb44890 thread T1 24: #0 0x5470bb in mdnsd_out /home/travis/build/open62541/open62541/deps/mdnsd/libmdnsd/mdnsd.c:774:6 24: #1 0x55112e in mdnsd_step /home/travis/build/open62541/open62541/deps/mdnsd/libmdnsd/mdnsd.c:1235:10 24: #2 0x152959b in iterateMulticastDiscoveryServer /home/travis/build/open62541/open62541/src/server/ua_services_discovery_multicast.c:490:29 24: #3 0x59d95a in UA_Server_run_iterate /home/travis/build/open62541/open62541/src/server/ua_server.c:441:13 24: #4 0x52bd9d in serverloop_lds /home/travis/build/open62541/open62541/tests/server/check_discovery.c:35:9 24: #5 0x2b44e8c77183 in start_thread /build/eglibc-ripdx6/eglibc-2.19/nptl/pthread_create.c:312 24: #6 0x2b44e93a703c in clone /build/eglibc-ripdx6/eglibc-2.19/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:111 24: 24: Address 0x2b44ecb44890 is located in stack of thread T1 at offset 20848 in frame 24: #0 0x5509ef in mdnsd_step /home/travis/build/open62541/open62541/deps/mdnsd/libmdnsd/mdnsd.c:1197 24: 24: This frame has 7 object(s): 24: [32, 10256) 'm' (line 1199) 24: [10512, 10516) 'ssize' (line 1203) 24: [10528, 20528) 'buf' (line 1204) 24: [20784, 20800) 'from' (line 1205) 24: [20816, 20832) 'to' (line 1228) 24: [20848, 20852) 'ip' (line 1229) <== Memory access at offset 20848 partially overflows this variable 24: [20864, 20866) 'port' (line 1230) 24: HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext 24: (longjmp and C++ exceptions *are* supported) 24: Thread T1 created by T0 here: 24: #0 0x43462d in __interceptor_pthread_create (/home/travis/build/open62541/open62541/build/bin/tests/check_discovery+0x43462d) 24: #1 0x52849a in setup_lds /home/travis/build/open62541/open62541/tests/server/check_discovery.c:59:5 24: #2 0x1615a06 in srunner_run_unchecked_setup.isra.9 (/home/travis/build/open62541/open62541/build/bin/tests/check_discovery+0x1615a06) 24: #3 0x2b44e92caf44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287 ``` See also https://travis-ci.org/open62541/open62541/jobs/474897811#L5828
``` 27: READ of size 4 at 0x7ffe44da68c1 thread T0 27: #0 0x4eed2b in __asan_memcpy (/home/travis/build/open62541/open62541/build/bin/tests/check_pubsub_connection_udp+0x4eed2b) 27: #1 0x553464 in UA_Array_copy /home/travis/build/open62541/open62541/src/ua_types.c:1067:9 27: #2 0x55bf3b in Variant_copy /home/travis/build/open62541/open62541/src/ua_types.c:422:28 27: #3 0x55938a in copy_noInit /home/travis/build/open62541/open62541/src/ua_types.c:934:23 27: #4 0x552df5 in UA_copy /home/travis/build/open62541/open62541/src/ua_types.c:959:28 27: #5 0x14a5d61 in UA_Variant_copy /home/travis/build/open62541/open62541/build/src_generated/ua_types_generated_handling.h:758:12 27: #6 0x14a5c58 in UA_PubSubConnectionConfig_copy /home/travis/build/open62541/open62541/src/pubsub/ua_pubsub.c:50:23 27: #7 0x14b5adb in UA_Server_addPubSubConnection /home/travis/build/open62541/open62541/src/pubsub/ua_pubsub_manager.c:44:28 27: #8 0x52abc5 in AddSingleConnectionWithMaximalConfiguration /home/travis/build/open62541/open62541/tests/pubsub/check_pubsub_connection_udp.c:142:28 27: #9 0x1615721 in tcase_run_tfun_nofork.isra.11 (/home/travis/build/open62541/open62541/build/bin/tests/check_pubsub_connection_udp+0x1615721) 27: #10 0x161598d in srunner_run (/home/travis/build/open62541/open62541/build/bin/tests/check_pubsub_connection_udp+0x161598d) 27: #11 0x5275de in main /home/travis/build/open62541/open62541/tests/pubsub/check_pubsub_connection_udp.c:216:5 27: #12 0x2b442723ff44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287 27: #13 0x41af9b in _start (/home/travis/build/open62541/open62541/build/bin/tests/check_pubsub_connection_udp+0x41af9b) ``` See also https://travis-ci.org/open62541/open62541/jobs/474897811#L5964
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2330
See #2330 (comment) for a detailed error description