Fork me on GitHub
#babashka
<
2019-11-20
>
borkdude10:11:55

status of the conch branch: this works:

$ lein bb '(conch/programs grep ps) (grep "ssh" {:in (ps "-e" {:seq true})})'
but this seems to get stuck:
$ ./bb '(conch/programs grep ps) (grep "ssh" {:in (ps "-e" {:seq true})})'

borkdude10:11:12

Currently I have no idea why this gets stuck. Feel free to help debugging 🙂

borkdude19:11:54

@sogaiu Thanks for confirming that this affects both lein and native: https://github.com/borkdude/babashka/issues/119#issuecomment-556295326

sogaiu19:11:11

have left them both running, will check on their status when back from a walk :)

borkdude19:11:36

I hope your computer won't blow up

borkdude20:11:39

This is babashka built with GraalVM 19.3.0: Linux: https://1858-201467090-gh.circle-artifacts.com/0/release/babashka-0.0.33-SNAPSHOT-linux-amd64.zip macOS: https://1856-201467090-gh.circle-artifacts.com/0/release/babashka-0.0.33-SNAPSHOT-macos-amd64.zip Can you check if ./bb '(slurp "")' works? It works on my machine now without any additional settings. (cc @jeroenvandijk)

jeroenvandijk21:11:35

@borkdude yes this works! Nice 🙂

lvh20:11:04

@borkdude per #1336 I could get that preciously but not with ECC, so you probably want to check that it’s negotiating something decent

borkdude20:11:18

@lvh Oh sorry, I thought you were only referring to the SSL stuff. How can I trigger something ECC related in Clojure?

lvh20:11:16

Ideally you wouldn’t have to: the problem is that if you disabled libsunec’s associated provider, everything just worked, but only did DHE instead of ECDHE— let me get you a reproducer

sogaiu20:11:22

@borkdude tried the 0.0.33-SNAPSHOT-linux-ad64 snapshot here with the slurp successfully :thumbsup:

borkdude20:11:44

@sogaiu can you also check if it still failed in 0.0.32?

jeroenvandijk21:11:29

@borkdude it failed with 0.0.32

➜ ✗ bb '(slurp "")'
WARNING: The sunec native library, required by the SunEC provider, could not be loaded. This library is usually shipped as part of the JDK and can be found under <JAVA_HOME>/jre/lib/<platform>/libsunec.so. It is loaded at run time via System.loadLibrary("sunec"), the first time services from SunEC are accessed. To use this provider's services the java.library.path system property needs to be set accordingly to point to a location that contains libsunec.so. Note that if java.library.path is not set it defaults to the current working directory.
sun.security.ec.ECKeyPairGenerator.isCurveSupported([B)Z [symbol: Java_sun_security_ec_ECKeyPairGenerator_isCurveSupported or Java_sun_security_ec_ECKeyPairGenerator_isCurveSupported___3B]
➜ ✗ bb --version
babashka v0.0.32

borkdude21:11:05

I'm releasing 0.0.33 in a minute with this enhancement

🎉 4
lvh20:11:23

You can use https://github.com/lvh/nscap to capture traffic and then Wireshark or whatever to see if something does ECDHE. Or when I get off this plane and am at Conj, I’ll do it myself :)

borkdude20:11:30

with 0.0.32 I got:

$ /usr/local/bin/bb '(slurp "")'
WARNING: The sunec native library, required by the SunEC provider, could not be loaded.

borkdude20:11:15

@lvh I'll let you do it yourself, because I don't really understand this stuff. Have fun at the conj 🙂

sogaiu20:11:18

with 0.0.32 (built via the tag):

$ ./bb '(slurp "")'
WARNING: The sunec native library, required by the SunEC provider, could not be loaded. This library is usually shipped as part of the JDK and can be found under <JAVA_HOME>/jre/lib/<platform>/libsunec.so. It is loaded at run time via System.loadLibrary("sunec"), the first time services from SunEC are accessed. To use this provider's services the java.library.path system property needs to be set accordingly to point to a location that contains libsunec.so. Note that if java.library.path is not set it defaults to the current working directory.
sun.security.ec.ECKeyPairGenerator.isCurveSupported([B)Z [symbol: Java_sun_security_ec_ECKeyPairGenerator_isCurveSupported or Java_sun_security_ec_ECKeyPairGenerator_isCurveSupported___3B]

borkdude20:11:02

yep, thanks.

borkdude20:11:47

I've merged the upgrade to 19.3.0 to master now

borkdude20:11:10

suddenly integrating some http client becomes more interesting now

sogaiu20:11:52

i wonder if someone has wrapped: http://openjdk.java.net/jeps/321

sogaiu20:11:39

iiuc, it has websocket and http2 support

borkdude20:11:55

although this requires JDK9, bb is still on JDK 8 for now

sogaiu20:11:10

ah, well something to experiment with and look forward to 🙂

borkdude20:11:16

sure, yay 🙂

sogaiu20:11:22

btw, regarding the conch test, both the bb and lein bb processes are still hung at the same place.

borkdude20:11:09

yeah, I noticed too

sogaiu20:11:03

wonder what the "DRUNK" thing is...

"IN" nil
"IN" clojure.lang.LazySeq
"GET DRUNK" ("  PID TTY          TIME CMD"

borkdude20:11:39

it's logging I added. Drinkable is protocol on conch

borkdude20:11:48

and get-drunk is a function which uses that protocol

sogaiu20:11:27

ahhhh, thanks, was really starting to wonder 🙂

borkdude20:11:02

haha, great names aren't they