-
Notifications
You must be signed in to change notification settings - Fork 4
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 send on macos #27
Comments
This seems to be related to the behaviour of Line 239 in f898b50
Thank you for your issue, I am unfortunately not a Mac owner, can you test this version (#28) of Bob which should (a priori) fix your issue? We should probably also look at Cosmopolitan support. It seems to me that the "bob.com" version works on MacOS (surprising) which describes a behaviour I had not imagined (maybe on MacOS, |
Hi, Testing is still not satisfying. Now it can connect but it only send 64KiB and then terminate. Have a good day |
I will try to figure out why. It will take a time because it seems that this bug appears only on MacOS (and I need to talk to some friends to reproduce & test your case). Can you tell me which version of OS X do you have and which Mac (to be able to reproduce then)? |
As already said above, I run macos 12.6.1 on a x86-64 mac. More precisely it is a macbook pro 16 of 2019 with a 2,3 GHz Intel Core i9 (8 cores). |
With the help from @kit-ty-kate (who she has a MacOS too), I can understand a bit more what is going on. It seems that problem is much more related to how we read the given file than the transmission and/or the protocol (which is a kind of good news). More concretely, it seems that Lines 748 to 752 in f898b50
(Confirmed by your log here). This signal can come from |
Hi again, No problem for testing. Do not hesitate. My only question is how do I limit the logs to the bob.fiber, bob.stream and bob.pack? |
We don't have yet a standalone mechanism to filter logs. You probably can just save all logs into a file and do a $ bob send -p <password> file.txt &> log.txt
$ grep "bob\.\(fiber\|pack\|stream\)" log.txt |
For the moment the complete debug is here: https://gist.github.com/fdagnat/38c48d12b392e5fd2e1c68185c3eb805 |
Arf, I forgot to notice you to re-update the version of $ opam pin add bob https://github.com/dinosaure/bob.git#fix-connect-macos-native
$ opam reinstall bob |
Yes, it's better, I will try to figure out from this outcome what is going on precisely 👍. |
I think I finally found the issue. It seems that the Lines 386 to 391 in f898b50
The documentation about the $ opam pin add bob https://github.com/dinosaure/bob.git#fix-connect-macos-native
$ opam reinstall bob
$ bob send -p <password> file.txt &> log.txt
$ grep "bob\.\(fiber\|pack\|stream\)" log.txt |
It seems to work, probably, on the other side, you must have the same version of |
Hum, the other party was a colleague on Linux using the official bob release. He get a file but with an error about the hash of the file. We can do more testing tomorrow if it is needed. Thanks for your work |
Hello,
It seems that Happy eyeballs changed its API. Have a good day |
Thansk, I just made a PR (#30) for that and the upstream version of Bob should work. I relaunched a build on https://builds.osau.re/ to integrate this PR into the It will be useful to get a log from the sender (with a MacOS & the fix available on #28) and the receiver (whatever the system & On the sender, something like: $ opam pin add bob https://github.com/dinosaure/bob.git#fix-connect-macos-native
$ opam install bob
$ ob send -p <password> file.txt &> log.txt And on the receiver: $ wget https://builds.osau.re/job/bob/build/latest/f/bin/bob.com
$ chmod +x bob.com
$ ./bob.com recv <password> -vvv &> log.txt It will be super useful. |
Hello again,
I tested with both send and receiver on my mac and with sender mac and receiver linux and got the same result. By consequence, I think there is another issue. Notice that now the receiver gets 2 blocks of 64K. In case it may serve, I let the trace there https://gist.github.com/fdagnat/b537392382c67dc56ba8deedaf59d478. Thanks again |
I don't know if it's relevant, but it could be an idea to log a warning here: Line 83 in f6feea3
|
You probably right but I don't think the issue about the corrupted file is related to this probable double-close. It's more about: how Bob deflates and transmits the file to the relay. The DNS part was already done before (just to resolve
It's probable that, on Mac, when we close the socket, we did not send everything for whatever reason. Again, it's highly related to the system's behavior and Mac (probably) temporise TCP/IP packets. Something like a flush is probably needed. |
To confirm my hypothesis, I just added a new commit on #28 which set the socket for the secure room with @fdagnat Would it be possible to test with this new version (again, do the |
The behavior is becoming more and more intriguing. From macos to linux, it never works (same 128K only transfer). From my machine to my machine (macos), without -vv it produces the same error (as Linux) and with -vv, it works correctly. |
Good news! I have an access to a Mac and I can reproduce your error. I will try to fix that as soon as I can but the iteration between logs and bugs will be better! I will come back to you when I will fix the initial issue. Thanks for your patience. |
I tried to play a bit with a Mac and see what happens. Currently, I can notice a real corruption between the sender and the receiver. As far as I can say, the relay is not the source of the bug but it seems that the sender craft a packet and send something which was changed by an other part of the code. This is indeed very intriguing. I'll try to look more closely at Bob's behaviour on the Mac, but it seems that the bug is related to the notion of block ownership. Like you, locally (and the relay), everything works. Like you, if you force some scheduling with |
@fdagnat, I just found the initial bug and I just tested on a MacOS that the commit fixes the issue. Can you confirm the fix? You need to $ opam pin add -y bob https://github.com/dinosaure/bob.git#good-fix We changed a bit the protocol so the usage of the current relay is probably buggy (but it seems fine, I just tested it). |
Hello,
Using a locally built version of bob (using opam pin) on a macos 12.6.1 (x86-64), the send does not work see below:
Any hint would be appreciated.
The text was updated successfully, but these errors were encountered: