Bitcoin Forum
December 16, 2017, 11:17:56 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: [REVOKED] Networking problems on OSX. Libevent/Libev.  (Read 918 times)
MatthewLM
Legendary
*
Offline Offline

Activity: 1092



View Profile WWW
October 18, 2013, 03:09:47 PM
 #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

Bitcoin Extra Wallet | Peercoin Android Wallet
BTC: 1D5A1q5d192j5gYuWiP3CSE5fcaaZxe6E9  PPC: PH7fVn1Xs7nkUFmdwCX2ZRYfLPCSwGxAq9
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1513423076
Hero Member
*
Offline Offline

Posts: 1513423076

View Profile Personal Message (Offline)

Ignore
1513423076
Reply with quote  #2

1513423076
Report to moderator
MatthewLM
Legendary
*
Offline Offline

Activity: 1092



View Profile WWW
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.

Bitcoin Extra Wallet | Peercoin Android Wallet
BTC: 1D5A1q5d192j5gYuWiP3CSE5fcaaZxe6E9  PPC: PH7fVn1Xs7nkUFmdwCX2ZRYfLPCSwGxAq9
MatthewLM
Legendary
*
Offline Offline

Activity: 1092



View Profile WWW
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.

Bitcoin Extra Wallet | Peercoin Android Wallet
BTC: 1D5A1q5d192j5gYuWiP3CSE5fcaaZxe6E9  PPC: PH7fVn1Xs7nkUFmdwCX2ZRYfLPCSwGxAq9
MatthewLM
Legendary
*
Offline Offline

Activity: 1092



View Profile WWW
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.

Bitcoin Extra Wallet | Peercoin Android Wallet
BTC: 1D5A1q5d192j5gYuWiP3CSE5fcaaZxe6E9  PPC: PH7fVn1Xs7nkUFmdwCX2ZRYfLPCSwGxAq9
TheNewAnon135246
Legendary
*
Offline Offline

Activity: 1498


View Profile WWW
October 23, 2013, 06:32:49 PM
 #5

Glad to hear you've found the problem Smiley
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!