- edited description
liberasurecode_test fails with "free(): invalid size" w/ ubuntu versions of jerasure/gf-complete
Log (make test):
ok 1 - test_create_backend_invalid_args: UNKNOWN
ok 2 - test_create_backend_invalid_args: UNKNOWN
ok 3 - test_encode_invalid_args: UNKNOWN
ok 4 - test_encode_cleanup_invalid_args: UNKNOWN
ok 5 - test_decode_invalid_args: UNKNOWN
ok 6 - test_decode_cleanup_invalid_args: UNKNOWN
*** Error in `/tmp/liberasurecode/test/.libs/lt-liberasurecode_test': free(): invalid size: 0x0000000001e781f0 ***
make: *** [test] Aborted (core dumped)
To reproduce:
- remove all instances of Jerasure/gf-complete from your system.
- install:
http://mirrors.kernel.org/ubuntu/pool/universe/g/gf-complete/libgf-complete1_1.0.2-1_amd64.deb http://mirrors.kernel.org/ubuntu/pool/universe/j/jerasure/libjerasure2_2.0.0-1_amd64.deb http://mirrors.kernel.org/ubuntu/pool/universe/j/jerasure/libjerasure-dev_2.0.0-1_amd64.deb
-
Rebuild liberasurecode "master"
-
Issue "make test"
@bloodeagle40234 would you be able to take a look?
Comments (20)
-
reporter -
reporter - changed title to liberasurecode_test fails with "free(): invalid size" w/ ubuntu versions of jerasure/gf-complete
-
Ack, I just started to look at.
-
reporter @kmgreen2 FYI.
@bloodeagle40234 thanks a lot for taking a peek!
-
@tsg- @bloodeagle40234 I do not have time to look at this tonight, but can look tomorrow morning, if you guys do not figure it out. Keep me in the loop.
-
@tsg- When I tried to take a look to this bug with new ubuntu 14.04 VM, the test didn't fail but I found doubtful code. I didn't reach why the test passed in my environment if my idea is true, but I'll try to figure out ASAP.
-
reporter @bloodeagle40234 I am using 14.04 vagrant box as well. Don't see this when using jerasure/gf-complete built from latest git .. but when using ubuntu packaged versions, it fails with the error .. so make sure you install the ubuntu versions.
-
@tsg- Yup, I tested both newest git and the ubuntu package but both of them passed.
Anyways, I pushed a new WIP code on wip branch [1] about doubtful code. I didn't confirm how to make the bug but I hope it might treat the bug you hit.
1: https://bitbucket.org/tsg-/liberasurecode/commits/a83c59c194ff4fde041d5806e1453821270f8b2a?at=master
-
@tsg- I tested on another environment at AWS. It was absolutely clear for testing. In the env, "double free or corruption" I expected with the doubtfull code above occurred so we need to merge the WIP code anyways to treat it. However, I sitll don't get whether the "free invalid size" caused from same issue or not. I wonder if you could test with the WIP code to clarify the bug.
-
@kmgreen2 Thanks to looked at and mereged my patch @tsg- I'm waiting you also had test the patch because I couldn't reraise the bug in my environment. If you still had this issue, I'll restart to try to figure out what really happened.
-
reporter @bloodeagle40234 can you please set up a new Ubuntu trusty chroot per https://wiki.ubuntu.com/SimpleSbuild. Build just "liberasurecode" in that environment and issue "make test". Thinking we need to avoid the assertions when a backend library is not found ..
-
@tsg- OK, I'll do that according to the SimpleSbuild and make a report.
-
@tsg- I'm glad to tell you my recent patch ("WIP: fix doubtful code") fixes your issue :)
I tested with following sequence at the new clean environment on ubuntu 14.04 on AWS:
NOTE: This procedure report has 2 branches (choice 1 and 2) to confirm the WIP patch really treat your issue.
- Creating schroot env
- Install jerasure and gf-complete with deb package
- Install related package (wget, git, autoconf, libtool) by apt-get.
- Cloning liberasurecode repository to local
- (choice 1) git reset --hard ceb8a406d015fe581f1d7b37f8435c18ba66e782 ( commit on "Fix JERAURE_SONAME in alg_sig.h" )
- (choice 2) git reset --hard d81488a6b7629abdf625515cc503f847cdf6bc2d ( commit on "WIP: fix doubtful code"
- bash autogen.sh, and then ./configure and then make
- make test
- test failed as:
1..88 ok 1 - test_create_backend_invalid_args: UNKNOWN lt-liberasurecode_test: liberasurecode_test.c:276: test_destroy_backend_invalid_args: Assertion `desc > 0' failed.
- make install
- ldconfig
- make test
- (choice 1) Fails with "free(): Invalid size" (same as you reported) with following logs:
1..88 ok 1 - test_create_backend_invalid_args: UNKNOWN ok 2 - test_create_backend_invalid_args: UNKNOWN ok 3 - test_encode_invalid_args: UNKNOWN ok 4 - test_encode_cleanup_invalid_args: UNKNOWN ok 5 - test_decode_invalid_args: UNKNOWN ok 6 - test_decode_cleanup_invalid_args: UNKNOWN *** Error in `/root/liberasurecode/test/.libs/lt-liberasurecode_test': free(): invalid size: 0x0000000001c2f1f0 *** make: *** [test] Aborted (core dumped)
- (choice 2) All tests passed :)
Hence, I trust current newest master doesn't fail with "free(): Invalid size", could you please confirm it again?
-
reporter @bloodeagle40234, we don't want the tests to fail in either case. and yes, the current master doesn't fail with invalid size.
-
@tsg- @kmgreen2 Sorry, it does not make me sence. The failure caused from absolutely a test code bug and it has been fixed on the current master so it will never fail. Do you still want to remove the test even though fixed, right? I could get rid of it easily but I didn't get the reason. Did I miss something?
-
@tsg- Perhaps, are you meaning we should squash the wip commit to the issue commit not to fail at any commits on master? If you allow me to modify the history of master branch (i.e. allow force push), I could do that but I am worried the force push might break something else. (e.g. version tags)
-
reporter @bloodeagle40234 sorry about the confusion over this issue. My point was that the assertions we are seeing with non-existent backends (not the double free one reported here), we should simply skip the test.
In my comment above about latest master, I was only confirming what you said - that it doesn't fail anymore with invalid size error .. thank you for fixing that.
-
-
reporter @bloodeagle40234 sounds good.
-
reporter - changed status to resolved
- Log in to comment