Displaying #maven-dev/2017-07-16.log:

Sun Jul 16 10:13:09 2017  hboutemy:Joined the channel
Sun Jul 16 10:15:01 2017  rfscholte:Joined the channel
Sun Jul 16 10:30:50 2017  hboutemy:Joined the channel
Sun Jul 16 10:49:39 2017  hboutemy:Joined the channel
Sun Jul 16 11:08:08 2017  hboutemy:Joined the channel
Sun Jul 16 11:10:35 2017  Michael-O:Joined the channel
Sun Jul 16 11:18:14 2017  Michael-O:Joined the channel
Sun Jul 16 11:18:49 2017  Michael-O:hboutemy, repo id is looking great in the shell
Sun Jul 16 11:26:47 2017  hboutemy:Joined the channel
Sun Jul 16 11:33:23 2017  olamy:Joined the channel
Sun Jul 16 11:33:26 2017  tibor_:Joined the channel
Sun Jul 16 11:34:08 2017  tibor_:Michael-O: I am checking the BSD command
Sun Jul 16 11:35:22 2017  Michael-O:sdf
Sun Jul 16 11:35:33 2017  Michael-O: /proc/curproc/status is all you need
Sun Jul 16 11:35:41 2017  Michael-O:pretty much like with GNU Linux
Sun Jul 16 11:35:52 2017  tibor_:no such file or dir
Sun Jul 16 11:35:57 2017  Michael-O:Can't figure it out for Solaris and macOS
Sun Jul 16 11:36:08 2017  Michael-O:procfs has to be mounted first
Sun Jul 16 11:36:12 2017  Michael-O:this is not default on BSD
Sun Jul 16 11:36:25 2017  Michael-O:Though, if you install OpenJDK, you get the notice to mount it in your fstab
Sun Jul 16 11:38:17 2017  tibor_:unfortunately by NAT does not work with BSD and maybe not with WiFI
Sun Jul 16 11:38:59 2017  tibor_:so you say /proc/curproc/status will be after jdk installation?
Sun Jul 16 11:40:59 2017  tibor_:On Ubuntu it is not installed. I will check google.
Sun Jul 16 11:42:29 2017  tibor_:jps command exist from JDK
Sun Jul 16 11:45:13 2017  Michael-O:You have to mount it manually
Sun Jul 16 11:45:14 2017  Michael-O:See: https://github.com/freebsd/freebsd-ports/blob/master/java/openjdk8/pkg-message
Sun Jul 16 11:45:32 2017  hboutemy:Joined the channel
Sun Jul 16 11:46:11 2017  Michael-O:We can always fallback to the ManagementBean code
Sun Jul 16 11:48:42 2017  tibor_:If you remember PING, such event was sent every 10 seconds to the fork. We have to keep it because the native commands may fail, so PING is a kind of fallback however it is slow > 30 sec. Native commands fast 1 sec.
Sun Jul 16 11:48:56 2017  Michael-O:That's OK for me.
Sun Jul 16 11:49:06 2017  Michael-O:The bonus of /proc/../status is the PPID
Sun Jul 16 11:49:22 2017  tibor_:yes I tried this as well
Sun Jul 16 11:51:20 2017  tibor_:e.g. cat /proc/25516/status => PPid: 1
Sun Jul 16 11:53:13 2017  Michael-O:What we actually need is a PidInfo interface with different implementations
Sun Jul 16 11:53:34 2017  Michael-O:Linux, BSD, Windows, Java 9, Solaris, macOS, Generic...
Sun Jul 16 11:53:37 2017  Michael-O:What do you think?
Sun Jul 16 11:53:58 2017  tibor_:The issue with calling native commands in Java is that shell process calls ps. Get from this PPID as Java fork, then shell as another PPID, then Java process of Maven
Sun Jul 16 11:54:49 2017  tibor_:It's a long chain of calls. I tried this on my working copy as well
Sun Jul 16 11:55:35 2017  Michael-O:I know, this is just a hacky workaround
Sun Jul 16 11:56:01 2017  Michael-O:Resorting to native code is likely not an option as we would need to distribute the dynamic libs
Sun Jul 16 11:56:03 2017  tibor_:$$ is shell-s PID from maven-shared-utils call, or $$PPID
Sun Jul 16 11:56:55 2017  tibor_:Much more simple is to send PID of Maven through plugin to the fork
Sun Jul 16 11:57:07 2017  tibor_:If Maven owns PID in Session, cool
Sun Jul 16 11:57:55 2017  tibor_:On Unix possible to do in mvn.sh
Sun Jul 16 11:58:00 2017  tibor_:Problem on Windows
Sun Jul 16 12:00:33 2017  Michael-O:This would only be possible in Maven 3.5.1
Sun Jul 16 12:02:11 2017  tibor_:I can imaging it on Unix like using native call in Maven 3.5.1 but how about native call on Windows? I could not find a way because windows is not command line dominant.
Sun Jul 16 12:02:35 2017  Michael-O:This would work if you switch to PowerShell
Sun Jul 16 12:02:43 2017  Michael-O:PowerShell gives you all you need
Sun Jul 16 12:03:16 2017  tibor_:or native lib like JANSI is already in mvn
Sun Jul 16 12:03:29 2017  tibor_:but I do not have experiences with PowerShell
Sun Jul 16 12:04:07 2017  hboutemy:Joined the channel
Sun Jul 16 12:04:08 2017  tibor_:in Maven would be cool. It owns its information
Sun Jul 16 12:04:29 2017  Michael-O:This would still require native code
Sun Jul 16 12:04:42 2017  Michael-O:You cannot obtain the pid unless the process hasn't been started
Sun Jul 16 12:04:53 2017  tibor_:@hboutemy: Do you think we have any native library in Maven where we can retrieve PID of Maven process?
Sun Jul 16 12:05:04 2017  tibor_:possible in mvn.sh easily
Sun Jul 16 12:06:28 2017  tibor_:this works I tried on Linux: java -Dmypid=$$
Sun Jul 16 12:06:37 2017  tibor_:with shell
Sun Jul 16 12:08:12 2017  Michael-O:This won't be the PID of the Java process but of the shell
Sun Jul 16 12:08:19 2017  Michael-O:launching the Java process
Sun Jul 16 12:09:33 2017  tibor_:then only native lib
Sun Jul 16 12:09:53 2017  tibor_:JNI
Sun Jul 16 12:10:06 2017  Michael-O:Correct
Sun Jul 16 12:10:32 2017  tibor_:we should lookup on github
Sun Jul 16 12:11:38 2017  Michael-O:JNA would also do actually
Sun Jul 16 12:13:27 2017  Michael-O:https://gist.github.com/ayosec/1515892/6faae5b27966e83695c58fc3ed2df52b681169ee
Sun Jul 16 12:14:24 2017  Michael-O:https://github.com/hudson3-plugins/jna-native-support-plugin/blob/master/src/test/java/org/hudsonci/plugins/jna/WindowsSupportTest.java#L56
Sun Jul 16 12:14:35 2017  Michael-O:I woudl go for this acutally
Sun Jul 16 12:14:53 2017  Michael-O:and forget the rest
Sun Jul 16 12:20:05 2017  olamy:Joined the channel
Sun Jul 16 12:22:52 2017  hboutemy:Joined the channel
Sun Jul 16 12:27:58 2017  tibor_:I have to fix several issues in 2.20.1. So I would see it like this. Override HEAD commit fore Jira 1302 and add native calls in next Jira, add IT for long Windows path and find out if prior to JDK 8 still has problem with long paths, fix JUnit Parameterized test which was fixed only for passing tests and not for failed tests, then few Github pull requests commit to master.
Sun Jul 16 12:29:05 2017  tibor_:jna-native-support-plugin
Sun Jul 16 12:29:22 2017  tibor_:Do you mean to use it as dependency in plugin?
Sun Jul 16 12:29:36 2017  tibor_:the packages should be shaded
Sun Jul 16 12:30:33 2017  Michael-O:Just the code ideas
Sun Jul 16 12:31:17 2017  tibor_:I downloaded the jar file but the native libs are not in there
Sun Jul 16 12:31:33 2017  tibor_:ah, maybe dependencies
Sun Jul 16 12:34:18 2017  tibor_:exactly, dependencies, looks duable
Sun Jul 16 12:34:31 2017  tibor_:doable
Sun Jul 16 12:35:43 2017  tibor_:the plugin itself has isolated ClassLoader which loads test classes. This means we can add Hudson staff and native JNA to plugin's ClassLoader and the end-user will not see it.
Sun Jul 16 12:36:02 2017  tibor_:hx
Sun Jul 16 12:36:05 2017  tibor_:THx
Sun Jul 16 12:40:29 2017  hboutemy:Joined the channel
Sun Jul 16 12:42:25 2017  tibor_:Michael-O: Do you think INFRA would allow me to ammend HEAD commit? See https://issues.apache.org/jira/browse/INFRA-14564
Sun Jul 16 12:59:12 2017  hboutemy:Joined the channel
Sun Jul 16 13:17:21 2017  hboutemy:Joined the channel
Sun Jul 16 13:35:27 2017  hboutemy:Joined the channel
Sun Jul 16 13:53:36 2017  hboutemy:Joined the channel
Sun Jul 16 14:06:26 2017  Michael-O:I guess so
Sun Jul 16 14:06:57 2017  Michael-O:There are no native libs bundles with JNA
Sun Jul 16 14:07:08 2017  Michael-O:All libs are loaded dynamically through JNA
Sun Jul 16 14:07:13 2017  Michael-O:that's quite nice
Sun Jul 16 14:07:32 2017  Michael-O:The overhead should be minimal
Sun Jul 16 14:11:52 2017  hboutemy:Joined the channel
Sun Jul 16 14:30:01 2017  hboutemy:Joined the channel
Sun Jul 16 14:59:54 2017  Michael-O:tibor_, did you check the gist sample?
Sun Jul 16 15:00:03 2017  Michael-O:That's the entire code we need for Un*x
Sun Jul 16 15:00:36 2017  tibor_:you mean Hudson? https://github.com/hudson3-plugins/jna-native-support-plugin
Sun Jul 16 15:01:31 2017  tibor_:how long time is the native call to get PID?
Sun Jul 16 15:02:07 2017  tibor_:because this call takes 55 millis ManagementFactory.getRuntimeMXBean().getName()
Sun Jul 16 15:02:21 2017  tibor_:did not try yet the first call ManagementFactory.getRuntimeMXBean()
Sun Jul 16 15:02:29 2017  tibor_:sometimes 82 millis
Sun Jul 16 15:02:44 2017  Michael-O:No, this one: https://gist.github.com/ayosec/1515892/6faae5b27966e83695c58fc3ed2df52b681169ee
Sun Jul 16 15:02:50 2017  tibor_:not sure how it is on old PC
Sun Jul 16 15:03:58 2017  Michael-O:What do you mean?
Sun Jul 16 15:04:08 2017  Michael-O:I can test that, I have an Atom 330 here at hand
Sun Jul 16 15:04:08 2017  hboutemy:Joined the channel
Sun Jul 16 15:04:15 2017  Michael-O:2 core, 4 threads
Sun Jul 16 15:06:00 2017  tibor_:try the most old platform 1CPU HDD and not flash drive
Sun Jul 16 15:06:18 2017  tibor_:gist has only interface
Sun Jul 16 15:07:07 2017  tibor_:import com.sun.jna.*; is not reachable. It must be some java lib. But Jigsaw may block com.sun
Sun Jul 16 15:07:24 2017  Michael-O:No, it is JNA
Sun Jul 16 15:07:31 2017  Michael-O:Here is windows: https://gist.github.com/mattn/253013/d47b90159cf8ffa4d92448614b748aa1d235ebe4
Sun Jul 16 15:08:24 2017  Michael-O:I really think we can use getpid() and getppid() und Unix and GetCurrentProcessId() and the wmic for ppid on Windows
Sun Jul 16 15:08:45 2017  Michael-O:Windows requires some more code for ppid
Sun Jul 16 15:08:49 2017  Michael-O:but still doable
Sun Jul 16 15:13:42 2017  tibor_:it can be doable, I did not say opposite but for me it's easier to use dependency and not to compile pid() for all platforms
Sun Jul 16 15:13:45 2017  tibor_:see this
Sun Jul 16 15:13:46 2017  tibor_:http://repo1.maven.org/maven2/org/jvnet/winp/winp/1.25/
Sun Jul 16 15:14:00 2017  tibor_:It contains winp.x64.dll
Sun Jul 16 15:14:10 2017  tibor_:it's from Hudson POM
Sun Jul 16 15:14:15 2017  tibor_:you sent me
Sun Jul 16 15:14:53 2017  Michael-O:There is nothing to compile here
Sun Jul 16 15:15:01 2017  Michael-O:JNA loads the lib dynamically
Sun Jul 16 15:15:07 2017  Michael-O:I think it uses dlopen() for that
Sun Jul 16 15:15:19 2017  Michael-O:In other words, you do not write any C code
Sun Jul 16 15:16:21 2017  Michael-O:Look, JNA has everything for you on Windows: https://github.com/java-native-access/jna/blob/master/contrib/platform/src/com/sun/jna/platform/win32/Kernel32.java
Sun Jul 16 15:16:32 2017  Michael-O:Process32First
Sun Jul 16 15:16:46 2017  Michael-O:GetCurrentProcessId and GetCurrentProcess
Sun Jul 16 15:21:30 2017  Michael-O:No need to use Hudson code
Sun Jul 16 15:22:50 2017  hboutemy:Joined the channel
Sun Jul 16 15:22:52 2017  tibor_:Is JNA directly in JDK or we have to add it?
Sun Jul 16 15:23:18 2017  tibor_:The com.sun package can be blocked by Java 9.
Sun Jul 16 15:24:28 2017  Michael-O:It is not in the JDK, just JAR in Central
Sun Jul 16 15:24:42 2017  Michael-O:for Java 9, we can use the builtin API and ignore JNA
Sun Jul 16 15:24:49 2017  tibor_:Is it this jar file ? http://repo1.maven.org/maven2/net/java/dev/jna/jna/4.4.0/
Sun Jul 16 15:26:36 2017  Michael-O:Correct
Sun Jul 16 15:36:28 2017  tibor_:Michael-O: we should write a prototype and Robert should common on regarding how Jigsaw works. For instance the interface "Library" seems to be from com.sun. A question is what happens if we repackage Library.
Sun Jul 16 15:37:06 2017  tibor_:typo: Robert should comment on ..
Sun Jul 16 15:41:00 2017  hboutemy:Joined the channel
Sun Jul 16 15:58:40 2017  hboutemy:Joined the channel
Sun Jul 16 16:00:13 2017  Michael-O:I think as long as you use classpath only, this should be a problem in my opinion
Sun Jul 16 16:05:39 2017  tibor_:Michael-O: What you mean? Jigsaw or?
Sun Jul 16 16:07:28 2017  Michael-O:module path would block it, but we don't use the module path. We use the class path.
Sun Jul 16 16:07:41 2017  Michael-O:Class path will stay forever. This is what Mark Reinhold said.
Sun Jul 16 16:07:58 2017  Michael-O:Btw, https://issues.apache.org/jira/browse/SUREFIRE-1391 looks like a trivial fix.
Sun Jul 16 16:11:31 2017  tibor_:We must not commit to master because I want to rollback the HEAD but INFRA still did not reply.
Sun Jul 16 16:11:59 2017  tibor_:Yes this looks simple to fix.
Sun Jul 16 16:16:19 2017  hboutemy:Joined the channel
Sun Jul 16 16:18:14 2017  Michael-O:branch off HEAD^ master
Sun Jul 16 16:18:19 2017  Michael-O:then you can merge alter
Sun Jul 16 16:20:58 2017  tibor_:I will introduce a new branch for sure. But the commit c343cc4 will not be lost. That you say will cause two commits with fix for SUREFIRE-1302.
Sun Jul 16 16:22:37 2017  Michael-O:Don't think so, You can keep on working 1302_3, squash and the merge back
Sun Jul 16 16:23:03 2017  tibor_:to master?
Sun Jul 16 16:23:11 2017  Michael-O:Yes, after reset.
Sun Jul 16 16:23:43 2017  tibor_:so it willbe one commit in master finally?
Sun Jul 16 16:25:59 2017  tibor_:ok, let's continue on branch 1302_3, we will finish it with consensus and then we will squash and merge back.
Sun Jul 16 16:34:44 2017  hboutemy:Joined the channel
Sun Jul 16 16:41:02 2017  tibor_:Michael-O: I have two selfs in IDEA. So I want to first compare with a new working copy and I will commit to 1302_3.
Sun Jul 16 16:42:12 2017  Michael-O:OK, fine with me.
Sun Jul 16 16:42:21 2017  Michael-O:Btw, you cannot read /proc/self
Sun Jul 16 16:42:23 2017  tibor_:Will we add jna?
Sun Jul 16 16:42:28 2017  Michael-O:this is virtual directory
Sun Jul 16 16:42:38 2017  Michael-O:you must read /proc/self/status and parse it
Sun Jul 16 16:43:10 2017  tibor_:it is a link
Sun Jul 16 16:43:42 2017  tibor_:new File("/proc/self").getCanonicalFile().getName()
Sun Jul 16 16:43:52 2017  tibor_:reads the link
Sun Jul 16 16:44:27 2017  tibor_: /proc/self -> 25516
Sun Jul 16 16:46:21 2017  Michael-O:http://man7.org/linux/man-pages/man5/proc.5.html
Sun Jul 16 16:46:31 2017  Michael-O: This directory refers to the process accessing the /proc
Sun Jul 16 16:46:31 2017  Michael-O: filesystem, and is identical to the /proc directory named by
Sun Jul 16 16:46:31 2017  Michael-O: the process ID of the same process.
Sun Jul 16 16:48:32 2017  tibor_:I will try on Ubuntu.
Sun Jul 16 16:49:15 2017  Michael-O:I expect it to work
Sun Jul 16 16:49:27 2017  tibor_:on BSD as well?
Sun Jul 16 16:50:15 2017  Michael-O:Use /proc/curpoc/status
Sun Jul 16 16:50:20 2017  Michael-O:curproc*
Sun Jul 16 16:50:27 2017  Michael-O:See here: https://www.freebsd.org/cgi/man.cgi?query=procfs&apropos=0&sektion=0&manpath=FreeBSD+11.0-RELEASE+and+Ports&arch=default&format=html
Sun Jul 16 16:50:31 2017  Michael-O:applies to all BSDs
Sun Jul 16 16:50:34 2017  Michael-O:maybe even to macOS
Sun Jul 16 16:52:38 2017  hboutemy:Joined the channel
Sun Jul 16 16:54:35 2017  tibor_:cat: /proc/curproc/status: No such file or directory
Sun Jul 16 17:01:46 2017  Michael-O:Did you mount procfs first?
Sun Jul 16 17:02:01 2017  Michael-O: mount -t procfs proc /proc
Sun Jul 16 17:10:50 2017  hboutemy:Joined the channel
Sun Jul 16 17:29:31 2017  hboutemy:Joined the channel
Sun Jul 16 17:47:40 2017  hboutemy:Joined the channel
Sun Jul 16 18:06:50 2017  hboutemy:Joined the channel
Sun Jul 16 18:24:27 2017  hboutemy:Joined the channel
Sun Jul 16 18:30:43 2017  tibor_:Joined the channel
Sun Jul 16 18:43:10 2017  hboutemy:Joined the channel
Sun Jul 16 19:01:51 2017  hboutemy:Joined the channel
Sun Jul 16 19:19:58 2017  hboutemy:Joined the channel
Sun Jul 16 19:37:37 2017  hboutemy:Joined the channel
Sun Jul 16 19:56:19 2017  hboutemy:Joined the channel
Sun Jul 16 20:14:59 2017  hboutemy:Joined the channel
Sun Jul 16 20:33:41 2017  hboutemy:Joined the channel
Sun Jul 16 20:39:31 2017  Michael-O:tibor_, did you mount the FS first?
Sun Jul 16 20:44:12 2017  tibor_:now I am ironing shirst, but I will try
Sun Jul 16 20:49:03 2017  tibor_:Michael-O: How is sudo on BSD?
Sun Jul 16 20:49:22 2017  tibor_:mount: Operation not permitted
Sun Jul 16 20:50:00 2017  Michael-O:as root?
Sun Jul 16 20:50:17 2017  Michael-O:sudo is not default, has to be installed and configured
Sun Jul 16 20:50:21 2017  Michael-O:log in as root
Sun Jul 16 20:52:21 2017  hboutemy:Joined the channel
Sun Jul 16 21:02:17 2017  Michael-O:add yourself to the wheel group
Sun Jul 16 21:02:31 2017  Michael-O:pd groupmod -n wheel -m tibor
Sun Jul 16 21:06:05 2017  tibor_:pd: not found
Sun Jul 16 21:10:28 2017  hboutemy:Joined the channel
Sun Jul 16 21:29:11 2017  hboutemy:Joined the channel
Sun Jul 16 21:34:05 2017  Michael-O:sorry, pw
Sun Jul 16 21:34:09 2017  Michael-O:too late already
Sun Jul 16 21:47:52 2017  hboutemy:Joined the channel
Sun Jul 16 22:06:30 2017  hboutemy:Joined the channel
Sun Jul 16 22:21:12 2017  hboutemy:Joined the channel
Sun Jul 16 22:39:19 2017  hboutemy:Joined the channel
Sun Jul 16 22:58:02 2017  hboutemy:Joined the channel
Sun Jul 16 23:16:11 2017  hboutemy:Joined the channel
Sun Jul 16 23:35:22 2017  hboutemy:Joined the channel
Sun Jul 16 23:53:29 2017  hboutemy:Joined the channel

Comments