Skip to content

valgrind errors around stacks and context switches in newsched #6428

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

Closed
brson opened this issue May 12, 2013 · 1 comment
Closed

valgrind errors around stacks and context switches in newsched #6428

brson opened this issue May 12, 2013 · 1 comment
Assignees
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows
Milestone

Comments

@brson
Copy link
Contributor

brson commented May 12, 2013

I think these are probably because we're not calling VALGRIND_STACK_REGISTER, but sometimes I see many instances of this type of error:

==936== Invalid read of size 8
==936==    at 0xAA8598: rt::uv::uvio::__extensions__::write::anon::expr_fn_40723 (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/test/coretest.stage1-x86_64-unknown-linux-gnu)
==936==    by 0xA72E1F: rt::sched::__extensions__::meth_39073::run_cleanup_job::_d89672ea64dda16::_07pre (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/test/coretest.stage1-x86_64-unknown-linux-gnu)
==936==    by 0xA6F383: rt::sched::__extensions__::meth_38960::resume_task_immediately::_a2575627634c4428::_07pre (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/test/coretest.stage1-x86_64-unknown-linux-gnu)
==936==    by 0xA9A0CB: rt::uv::uvio::__extensions__::tcp_connect::anon::anon::expr_fn_40192 (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/test/coretest.stage1-x86_64-unknown-linux-gnu)
==936==    by 0xABC2AB: rt::uv::net::__extensions__::connect_cb::__rust_abi (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/test/coretest.stage1-x86_64-unknown-linux-gnu)
==936==    by 0xABC49C: rt::uv::net::__extensions__::connect_cb::__rust_stack_shim (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/test/coretest.stage1-x86_64-unknown-linux-gnu)
==936==    by 0x5BFBAEB: upcall_call_shim_on_rust_stack (rust_upcall.cpp:103)
==936==    by 0xABC0B7: rt::uv::net::__extensions__::connect_cb::_bca9d17c2f9fc276::_07pre (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/test/coretest.stage1-x86_64-unknown-linux-gnu)
==936==    by 0x5C0FD95: uv__stream_io (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/librustrt.so)
==936==    by 0x5C162BC: uv__io_poll (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/librustrt.so)
==936==    by 0x5C0B40D: uv_run (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/librustrt.so)
==936==    by 0xAB33D4: rust_uv_run__c_stack_shim (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/test/coretest.stage1-x86_64-unknown-linux-gnu)
==936==  Address 0x1abd4100 is 9,998,528 bytes inside a block of size 10,000,048 alloc'd
==936==    at 0x4C2B4F0: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==936==    by 0x5BFF2EE: rust_exchange_alloc::realloc(void*, unsigned long) (rust_exchange_alloc.cpp:32)
==936==    by 0x5BF37FF: vec_reserve_shared (rust_util.h:75)
==936==    by 0x4248F9: vec::rustrt::vec_reserve_shared::_d93fcb2da81ef4d::_07pre (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/test/coretest.stage1-x86_64-unknown-linux-gnu)
==936==    by 0x4246AA: vec::reserve_11902::_feb243f343efb87f::_07pre (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/test/coretest.stage1-x86_64-unknown-linux-gnu)
==936==    by 0x749204: vec::with_capacity_20601::_d069f83199a42fd0::_07pre (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/test/coretest.stage1-x86_64-unknown-linux-gnu)
==936==    by 0xAC5255: rt::stack::__extensions__::meth_41483::new::_2f39639a42826edf::_07pre (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/test/coretest.stage1-x86_64-unknown-linux-gnu)
==936==    by 0xA74579: rt::stack::__extensions__::meth_39135::take_segment::_2f39639a42826edf::_07pre (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/test/coretest.stage1-x86_64-unknown-linux-gnu)
==936==    by 0xA73DE6: rt::sched::__extensions__::meth_39126::with_local::_03fe2be4efca6ed::_07pre (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/test/coretest.stage1-x86_64-unknown-linux-gnu)
==936==    by 0xA84686: rt::test::spawntask_immediately::_866c76cd73dffbc7::_07pre (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/test/coretest.stage1-x86_64-unknown-linux-gnu)
==936==    by 0xA85A23: rt::io::net::tcp::test::multiple_connect_serial::anon::expr_fn_39598 (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/test/coretest.stage1-x86_64-unknown-linux-gnu)
==936==    by 0xA74E95: rt::sched::__extensions__::build_start_wrapper::anon::anon::expr_fn_39150 (in /opt/dev/rust3/build/x86_64-unknown-linux-gnu/test/coretest.stage1-x86_64-unknown-linux-gnu)

@ghost ghost assigned brson May 12, 2013
brson added a commit to brson/rust that referenced this issue May 12, 2013
brson added a commit to brson/rust that referenced this issue May 14, 2013
@brson
Copy link
Contributor Author

brson commented Jun 20, 2013

Fixed.

@brson brson closed this as completed Jun 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows
Projects
None yet
Development

No branches or pull requests

1 participant