Different errors for different read size while calling nfs_read()

20 views
Skip to first unread message

kool.n...@gmail.com

unread,
Oct 21, 2016, 5:42:48 PM10/21/16
to libnfs
I am trying to call nfs_read. It takes a count argument for the size/number of bytes to be read. If I give count as 10 it works just fine. But if I give the count size as 30 I get the following error

*** glibc detected *** ./my_exe: munmap_chunk(): invalid pointer: 0x00007fc3ac0008e0 ***

Also note that the address of the buffer I am passing into nfs_read is 0x7fc3ac0008c0. There is always a difference of 0x20 in the address of the buffer I am passing and the address that is given in the error.

I only changed the value of count and rest all is the same in the entire code. And I am not calling free() from my code (at least not until later, and I have verified that my free() call is not being hit yet).

I have also passed count as 1024 for which I simply get a segmentation fault.

For count as 100 I get the following error

"libnfs-1.9.6/lib/libnfs.c:702: free_nfs_cb_data: Assertion `data->free_continue_data' failed."

Please help. Thanks
Message has been deleted

ronniesahlberg

unread,
Dec 9, 2016, 5:53:41 PM12/9/16
to libnfs, kool.n...@gmail.com
Make sure you have the latest version of libnfs.  Remove whatever version your distro installed and make sure you have only the latest version installed.
(distros lag quite a lot in versions  and some like ubuntu ship ancient versions)

Then look at utils/nfs-cat.c which is a utility that reads files off a server.
Reply all
Reply to author
Forward
0 new messages