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

Segmentation fault when running any of the example programs #3

Open
tonyfleck76 opened this issue Jul 13, 2016 · 10 comments
Open

Segmentation fault when running any of the example programs #3

tonyfleck76 opened this issue Jul 13, 2016 · 10 comments

Comments

@tonyfleck76
Copy link

Specifically, I am trying to run bfs on the LiveJournal graph provided as the example. I successfully got the graph preprocessed, but running ./bin/bfs /LiveJournal_Grid 0 8 breaks. When I run it with GDB, I get this error message:

Program received signal SIGSEGV, Segmentation fault. _IO_vfscanf_internal (s=0x0, format=0x406b7d "%d %d %ld %d", argptr=argptr@entry=0x7fffffffd2e8, errp=errp@entry=0x0) at vfscanf.c:347 347 vfscanf.c: No such file or directory.

Am I doing something wrong when running the program or is there an issue with the way it compiled?

@coolerzxw
Copy link
Member

Hi @tonyfleck76 , can you provide me the detailed commands you used including preprocessing?

@tonyfleck76
Copy link
Author

Well, I first ran it on the graph downloaded from the link provided in the README. I then ran

./bin/preprocess -i /data/LiveJournal -o /data/LiveJournal_Grid -v 4847571 -p 4 -t 0

on it and got an error. When I looked at the issues I saw the other open one had some code to convert the LiveJournal file into binary form. I ran it through that and then ran the same prepocessing command. That appeared to have worked and gave me the LiveJournal_Grid directory that I have been passing as an argument to the bfs program.

@coolerzxw
Copy link
Member

Well, the preprocessed files are located at "/data/LiveJournal_Grid", but it seems that you passed "/LiveJournal_Grid" to the bfs program. Is this the problem (i.e. so fscanf failed to get content from the file)?

@tonyfleck76
Copy link
Author

Unfortunately that is not it. Sorry, I should have changed that to show that I did not create a data directory. LiveJournal_Grid is in the main GridGraph directory.

@coolerzxw
Copy link
Member

What does the LiveJournal_Grid folder look like (e.g. sizes of the files under the folder) ?

@tonyfleck76
Copy link
Author

ls LiveJournal_Grid/ block-0-0 block-1-0 block-2-0 block-3-0 column parent block-0-1 block-1-1 block-2-1 block-3-1 column_offset row block-0-2 block-1-2 block-2-2 block-3-2 degree row_offset block-0-3 block-1-3 block-2-3 block-3-3 meta

Also, I worked out the segfault issue, but get this error instead.

GridGraph/core/bigvector.hpp:89: void BigVector<T>::init(std::__cxx11::string, size_t) [with T = int; std::__cxx11::string = std::__cxx11::basic_string<char>; size_t = long unsigned int]: Assertion 'fd!= -1' failed. Aborted (core dumped)

@tonyfleck76
Copy link
Author

-rw-r--r-- 1 tony tony 269334576 Jul 13 10:56 block-0-0
-rw-r--r-- 1 tony tony  51552688 Jul 13 10:56 block-0-1
-rw-r--r-- 1 tony tony  19681928 Jul 13 10:56 block-0-2
-rw-r--r-- 1 tony tony   2791952 Jul 13 10:56 block-0-3
-rw-r--r-- 1 tony tony  55155664 Jul 13 10:56 block-1-0
-rw-r--r-- 1 tony tony  50074176 Jul 13 10:56 block-1-1
-rw-r--r-- 1 tony tony  12396840 Jul 13 10:56 block-1-2
-rw-r--r-- 1 tony tony   6498848 Jul 13 10:56 block-1-3
-rw-r--r-- 1 tony tony  19986976 Jul 13 10:56 block-2-0
-rw-r--r-- 1 tony tony  12129536 Jul 13 10:56 block-2-1
-rw-r--r-- 1 tony tony  19227224 Jul 13 10:56 block-2-2
-rw-r--r-- 1 tony tony   5787824 Jul 13 10:56 block-2-3
-rw-r--r-- 1 tony tony   2751472 Jul 13 10:56 block-3-0
-rw-r--r-- 1 tony tony   6035224 Jul 13 10:56 block-3-1
-rw-r--r-- 1 tony tony   5335752 Jul 13 10:56 block-3-2
-rw-r--r-- 1 tony tony  13209504 Jul 13 10:56 block-3-3
-rw-r--r-- 1 tony tony 551950184 Jul 13 10:56 column
-rw-r--r-- 1 tony tony       136 Jul 13 10:56 column_offset
-rw-rw-r-- 1 tony tony  19390284 Jul 13 11:00 degree
-rw-rw-r-- 1 tony tony        20 Jul 13 10:56 meta
-rw-rw-r-- 1 tony tony  19390284 Jul 13 10:57 parent
-rw-r--r-- 1 tony tony 551950184 Jul 13 10:56 row
-rw-r--r-- 1 tony tony       136 Jul 13 10:56 row_offset

I thought this might be a bit more useful.

@coolerzxw
Copy link
Member

You might try inserting the following statement at Ln.89 in "core/bigvector.hpp" (before the assertion):

perror("error message: ");

It could tell us what the exact error is. Thanks.

@tonyfleck76
Copy link
Author

bin/bfs LiveJournal_Grid/ 0 16
Error message: : Invalid argument
bfs: GridGraph/core/bigvector.hpp:90: void BigVector<T>::init(std::__cxx11::string, size_t) [with T = int; std::__cxx11::string = std::__cxx11::basic_string<char>; size_t = long unsigned int]: Assertion `fd!=-1' failed.
Aborted (core dumped)

@coolerzxw
Copy link
Member

It seems that O_DIRECT is not supported... What is the kernel version? And the type of the file system? I found some similar cases via Google but I am not sure what exactly causes the problem.

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

2 participants