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

cannot run example/hello onUbuntu #31

Closed
IronBlood opened this issue Oct 15, 2013 · 9 comments
Closed

cannot run example/hello onUbuntu #31

IronBlood opened this issue Oct 15, 2013 · 9 comments

Comments

@IronBlood
Copy link
Contributor

Hi, I've built example/hello successfully on Ubuntu 10.04. However, when I invoke

./hello

there prints

[-1210722624] [2013-10-15 13:47:21] [ERROR poller.c:106] Trying to add an invalid file descriptor to the poller. Please check.
Segmentation fault. (core dumped)

Please tell me how to execute the onion apps correctly. Thanks!

@davidmoreno
Copy link
Owner

Which ubuntu version are you using?
On Oct 15, 2013 6:56 AM, "Yang Shen" notifications@github.com wrote:

Hi, I've built example/hello successfully on Ubuntu 10.04. However, when I
invoke

./hello

there prints

[-1210722624] [2013-10-15 13:47:21] [ERROR poller.c:106] Trying to add an
invalid file descriptor to the poller. Please check.
Segmentation fault. (core dumped)

Please tell me how to execute the onion apps correctly. Thanks!


Reply to this email directly or view it on GitHubhttps://github.com//issues/31
.

@IronBlood
Copy link
Contributor Author

ubuntu 10.04, with gcc 4.4.3 and cmake 2.8.1.

2013/10/15 David Moreno Montero notifications@github.com

Which ubuntu version are you using?
On Oct 15, 2013 6:56 AM, "Yang Shen" notifications@github.com wrote:

Hi, I've built example/hello successfully on Ubuntu 10.04. However, when
I
invoke

./hello

there prints

[-1210722624] [2013-10-15 13:47:21] [ERROR poller.c:106] Trying to add
an
invalid file descriptor to the poller. Please check.
Segmentation fault. (core dumped)

Please tell me how to execute the onion apps correctly. Thanks!


Reply to this email directly or view it on GitHub<
https://github.com/davidmoreno/onion/issues/31>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/31#issuecomment-26314343
.

Regards

@davidmoreno
Copy link
Owner

Just now I'm on travel and cant access my ubuntu 10.04, but given the error you receive I think that maybe you have another program running on the same port.

Can you check it running on the shell:

netstat -anp | grep 8080

If something gets listed, then that program is using the same port and then hello can not bind to it. You can change the program editing the source code, and setting the listen port with, for example:

onion_set_port(o, "8081"); 

Please tell me if all this helps to solve the problem.

Regards,
David Moreno

@IronBlood
Copy link
Contributor Author

Hi, David

Thanks for your letter. Just now I set the demo hello to port 12222. I've
checked this port, however the same error occurs. Is there any suggested OS
so that we can migrate our code to onion asap.

Regards.

2013/10/15 David Moreno Montero notifications@github.com

Just now I'm on travel and cant access my ubuntu 10.04, but given the
error you receive I think that maybe you have another program running on
the same port.

Can you check it running on the shell:

netstat -anp | grep 8080

If something gets listed, then that program is using the same port and
then hello can not bind to it. You can change the program editing the
source code, and setting the listen port with, for example:

onion_set_port(o, "8081");

Please tell me if all this helps to solve the problem.

Regards,
David Moreno


Reply to this email directly or view it on GitHubhttps://github.com//issues/31#issuecomment-26323256
.

Regards

@davidmoreno
Copy link
Owner

Can you try to run it under valgrind and post me all output?
On Oct 15, 2013 1:10 PM, "Yang Shen" notifications@github.com wrote:

Hi, David

Thanks for your letter. Just now I set the demo hello to port 12222. I've
checked this port, however the same error occurs. Is there any suggested
OS
so that we can migrate our code to onion asap.

Regards.

2013/10/15 David Moreno Montero notifications@github.com

Just now I'm on travel and cant access my ubuntu 10.04, but given the
error you receive I think that maybe you have another program running on
the same port.

Can you check it running on the shell:

netstat -anp | grep 8080

If something gets listed, then that program is using the same port and
then hello can not bind to it. You can change the program editing the
source code, and setting the listen port with, for example:

onion_set_port(o, "8081");

Please tell me if all this helps to solve the problem.

Regards,
David Moreno


Reply to this email directly or view it on GitHub<
https://github.com/davidmoreno/onion/issues/31#issuecomment-26323256>
.

Regards


Reply to this email directly or view it on GitHubhttps://github.com//issues/31#issuecomment-26325728
.

@IronBlood
Copy link
Contributor Author

Hi, David

Just now I prepared a clean dev-environment and all works fine. Maybe there is something wrong with the previous environment, I'll check it later. Onion seems awesome!

Regards.

@IronBlood
Copy link
Contributor Author

There's something that might help others.

The function gnutls_hash_fast used in src/onion/codecs.c is one of the new APIs of libgnutls v2.9.10. Some Linux distributions are still using the old versions, e.g. the latest version used by ubuntu 10.04 LTS is 2.8.5.

@davidmoreno
Copy link
Owner

Thanks for the tip!

@IronBlood
Copy link
Contributor Author

Hi, @davidmoreno

I might get the answer to the original problem

Trying to add an invalid file descriptor to the poller. Please check.

Onion is using eventfd with EFD_CLOEXEC | EFD_NONBLOCK flags. These flags are available since Linux 2.6.27, however, the kernel I'm using on Ubuntu 10.04 is 2.6.18. I'll ask my VPS provider to update the kernel and try later.

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