Bitcoin Forum
May 06, 2024, 11:16:20 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [REVOKED] Networking problems on OSX. Libevent/Libev.  (Read 1015 times)
MatthewLM (OP)
Legendary
*
Offline Offline

Activity: 1190
Merit: 1004


View Profile
October 18, 2013, 03:09:47 PM
Last edit: October 23, 2013, 03:19:28 PM by MatthewLM
 #1

Edit: This offer has been revoked as a solution has been found. evthread_use_pthreads(); was not called and it needed to be.

Hello!

I have a problem with the networking code in cbitcoin which only occurs with OSX. I've tried using the libevent and libev libraries and both of them seemingly give the same problem. I've got libevent and libev to work on Linux Mint. If you try running the tests for cbitcoin on OSX Mountain Lion, the testCBNodeFull should stall because the nodes do not receive events for the connection, nor does the connection timeout work. What I have done is try to create a minimised example of the problem which clearly shows that the connection events are not working. I looked at tcpdump, and it appears to me that the connection is established. For some reason testCBNetworkCommunicator works when the code is almost identical. I should also mention that sometimes it has been working for me, and once the connection event was fired but not the accept event. Most of the time none of the events fire.

The code for the minimised example and more information is shown on this stack overflow question: http://stackoverflow.com/questions/19364342/libevent-code-not-connecting-or-timing-out-on-osx-mountain-lion

You can download and try cbitcoin using:

Code:
git clone https://github.com/MatthewLM/cbitcoin.git
cd cbitcoin
./configure
make test

The problematic code can be found on the accountingAndNodes branch.

Use "make debug-test" to build and test with debug symbols enabled. The libev counterpart to the default libevent code is currently found in /experimental. You will need to modify the makefile slightly to get that to work which is a simple affair.

Thanks,

Matthew Mitchell
1715037380
Hero Member
*
Offline Offline

Posts: 1715037380

View Profile Personal Message (Offline)

Ignore
1715037380
Reply with quote  #2

1715037380
Report to moderator
Every time a block is mined, a certain amount of BTC (called the subsidy) is created out of thin air and given to the miner. The subsidy halves every four years and will reach 0 in about 130 years.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715037380
Hero Member
*
Offline Offline

Posts: 1715037380

View Profile Personal Message (Offline)

Ignore
1715037380
Reply with quote  #2

1715037380
Report to moderator
MatthewLM (OP)
Legendary
*
Offline Offline

Activity: 1190
Merit: 1004


View Profile
October 21, 2013, 04:54:21 PM
 #2

The stackoverflow bounty ends in two days, so make sure not to miss out! I have also raised the bitcoin bounty to 0.25BTC. Not only that, the price of bitcoin has been rising. I suspect this should be an easy problem to solve for anyone with experience of libevent or libel or perhaps socket programming on OSX.
MatthewLM (OP)
Legendary
*
Offline Offline

Activity: 1190
Merit: 1004


View Profile
October 22, 2013, 12:05:39 PM
 #3

Last chance: The stackoverflow bounty ends tomorrow. I've also raised the bitcoin bounty one last time to 0.3BTC. Not only that, but the price of bitcoin has risen quite substantially making this a much more attractive offer.
MatthewLM (OP)
Legendary
*
Offline Offline

Activity: 1190
Merit: 1004


View Profile
October 23, 2013, 03:20:02 PM
 #4

This offer is now revoked. I needed to call evthread_use_pthreads(); which I forgot to do.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!