JIT Compiler crash on IBM JDK 6
Hi, I'm hitting a JIT compiler bug in IBM JDK 6 with the following code (forcing JIT compilation using -Xjit:count=0): (defprotocol FooProtocol (do-something [x])) (def foo (reify FooProtocol (do-something [this] (locking this (println XXX) (do-something foo) IBM JDK 6 is part of the clojure build matrix (though the last stable build is from over a year ago: http://build.clojure.org/job/clojure-test-matrix/jdk=IBM%20JDK%201.6/lastStableBuild/ ) I'm committed to supporting the IBM JVM as we are supporting AIX on PowerPC where there are no alternatives. For now I have to avoid the locking macro. The JVM crashes with the following output: Unhandled exception Type=Segmentation error vmState=0x0005ff05 J9Generic_Signal_Number=0004 Signal_Number=000b Error_Value= Signal_Code=0001 Handler1=7FBD43A7C900 Handler2=7FBD43735FB0 InaccessibleAddress=0008015F5718 RDI=019C2418 RSI=015F5700 RAX=015F5720 RBX=015C5378 RCX=0001 RDX= R8= R9=0001 R10= R11=015F54D8 R12=015C5AD0 R13=7FBD1F2E7240 R14=015F5700 R15=019C86F8 RIP=7FBD416E944A GS= FS= RSP=7FBD1F2E7040 EFlags=00210296 CS=0033 RBP=015C5A98 ERR=0004 TRAPNO=000E OLDMASK= CR2=0008015F5718 xmm0 ff00 (f: 0.00, d: 1.385239e-309) xmm1 (f: 0.00, d: 0.00e+00) xmm2 (f: 0.00, d: 0.00e+00) xmm3 (f: 0.00, d: 0.00e+00) xmm4 (f: 0.00, d: 0.00e+00) xmm5 (f: 0.00, d: 0.00e+00) xmm6 (f: 0.00, d: 0.00e+00) xmm7 (f: 0.00, d: 0.00e+00) xmm8 (f: 0.00, d: 0.00e+00) xmm9 (f: 0.00, d: 0.00e+00) xmm10 00ff (f: 16777215.00, d: 8.289046e-317) xmm11 (f: 0.00, d: 0.00e+00) xmm12 (f: 0.00, d: 0.00e+00) xmm13 (f: 0.00, d: 0.00e+00) xmm14 (f: 0.00, d: 0.00e+00) xmm15 (f: 0.00, d: 0.00e+00) Module=/usr/lib/jvm/ibm-java-x86_64-60/jre/lib/amd64/default/libj9jit24.so Module_base_address=7FBD4162D000 Method_being_compiled=user$reify__27.do_something()Ljava/lang/Object; Target=2_40_20121024_126067 (Linux 3.0.0-32-generic) CPU=amd64 (8 logical CPUs) (0x3eba54000 RAM) --- Stack Backtrace --- (0x7FBD416E944A [libj9jit24.so+0xbc44a]) (0x7FBD416EB6F3 [libj9jit24.so+0xbe6f3]) (0x7FBD416E7DA0 [libj9jit24.so+0xbada0]) (0x7FBD416E8060 [libj9jit24.so+0xbb060]) (0x7FBD416F4909 [libj9jit24.so+0xc7909]) (0x7FBD416F43C4 [libj9jit24.so+0xc73c4]) (0x7FBD4169F077 [libj9jit24.so+0x72077]) (0x7FBD4169E3EC [libj9jit24.so+0x713ec]) (0x7FBD437356B1 [libj9prt24.so+0x196b1]) (0x7FBD4169DE4D [libj9jit24.so+0x70e4d]) (0x7FBD4169AFF9 [libj9jit24.so+0x6dff9]) (0x7FBD437356B1 [libj9prt24.so+0x196b1]) (0x7FBD4169AD42 [libj9jit24.so+0x6dd42]) (0x7FBD4395F0F6 [libj9thr24.so+0x40f6]) (0x7FBD44F50EFC [libpthread.so.0+0x7efc]) clone+0x6d (0x7FBD44A86F8D [libc.so.6+0xe4f8d]) --- Paudi -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: JIT Compiler crash on IBM JDK 6
Hi Thomas, This is occuring on every Linux and AIX version I've tried, SR9, SR11 and SR12. I tried Java 7 but it seems Clojure is very broken on IBM Java 7. Getting ClassFormatErrors when building Clojure itself there! Paudi On Tuesday, 26 March 2013 14:38:44 UTC, Thomas wrote: Hi Paudi, Which particular version of the IBM JDK are you running (java -version) and have you checked if you are running the very latest version? Thomas -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: JIT Compiler crash on IBM JDK 6
Thanks for that, I'll have a look. Think it was SR3 on x86_64 I tried. On Tuesday, 26 March 2013 16:09:43 UTC, Thomas wrote: On Tuesday, March 26, 2013 3:19:08 PM UTC, Paudi Moriarty wrote: Hi Thomas, This is occuring on every Linux and AIX version I've tried, SR9, SR11 and SR12. I tried Java 7 but it seems Clojure is very broken on IBM Java 7. Getting ClassFormatErrors when building Clojure itself there! Paudi Interesting, I am now running Java 7 SR4 on Linux X86 (32bit) and haven't seen any problems (yet). Older versions of 7 did have problems, but they seem to have been fixed. Thomas -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: core.match and AOT
See http://dev.clojure.org/jira/browse/MATCH-63 for details. Paudi On 15 October 2012 23:21, David Nolen dnolen.li...@gmail.com wrote: On Mon, Oct 15, 2012 at 5:09 PM, Paudi Moriarty pmoria...@annadaletech.com wrote: It's broken since alpha10, alpha9 works fine. Paudi That's useful to know, thanks :) I suspect it may have something to do with the predicate stuff I added. David -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: core.match and AOT
It's broken since alpha10, alpha9 works fine. Paudi On Sunday, 14 October 2012 18:19:28 UTC+1, David Nolen wrote: On Sat, Oct 13, 2012 at 6:43 PM, Michael michae...@db.com javascript: wrote: core.match is alpha and has the following documentation note: if your project depends on AOT do not use core.match at this time Can somebody outline what the aot issues are? It seems that deploying a web app to heroku with lein2 will compile the app first. Was interested in using core.match to match authenticated, roles, and url namespaces. You can search JIRA for issues around AOT: http://dev.clojure.org/jira/browse/MATCH David -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: OSGi manifest creation for Clojure projects
It would be nice to setup a repository of Clojure bundles somewhere since the bundling process is now pretty straightforward. I have to use AOT as I can't ship source so The protocol issue with AOT is a bit frustrating. We end up having to AOT every bundle. This is acceptable to me as I have to bundlize every clojure dependency anyway. Would be nice to avoid it however. I'll share my bundling projects on GitHub anyway so you can see how I'm dealing with transitive dependencies and sources. Paudi On 17 Mar 2012, at 05:04, Mark Derricutt m...@talios.com wrote: Awesome. I see you're using the dependency plugin to only copy your specific AOT classes, I should really update the clojure-maven-plugin to only copy the discovered namespaces along. I remember Chas raised a bug years ago to fix this in the actual clojure compiler but I don't think it ever got resolved Since we're doing OSGi at work and we're wanting to integrate clojure I'm sure I'll be playing with your plugin soon :) On 17/03/12 10:48 AM, Patrick Moriarty wrote: I've posted the results in 2 posts on the topic if anyone is interested. I've spent quite a lot of time with Clojure and OSGi lately and have had some success in using Bnd and tools.namespace to generate a manifest for my mixed Clojure/Java project. I'm using clojure.osgi successfully to handle using requiring and loading clojure namespaces and to register and track OSGi services. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: OSGi manifest creation for Clojure projects
Yep, I have to repackage the transitive deps too but so far it's not proven to be a major hassle. I only have 10 or so clojure deps in total but the automatic manifest creation is the real timesaver. Paudi Sent from my iPhone On 17 Mar 2012, at 09:34, Laurent PETIT laurent.pe...@gmail.com wrote: Hi, How do you handle transitive dependencies ? Like, if you're repackaging library lib into my.osgi.lib, you'll also have to e.g. repackage library foo which library lib depends on as my.osgi.foo, and also change my.osgi.lib's pom.xml so that it now depends on library my.osgi.foo ... ? Also, I don't know if you're creating Eclipse plugins, but one problem I'm having right now, for example, is how to repackage leiningen-core (the core of lein2) into a set of bundles that can be included in their own Leiningen Feature. Currently, I'm doing it the quickdirty way: I use a specificity of Equinox which allows me to have jars inside a bundle, and so the repackaged Leiningen bundle is just a big bundle with a ton ( more than 30!) dependencies in it. I shall say it's working quite great, but I'm open to cleaner solutions if they do not require much overhead. 2012/3/17 Paudi Moriarty pmoria...@annadaletech.com It would be nice to setup a repository of Clojure bundles somewhere since the bundling process is now pretty straightforward. I have to use AOT as I can't ship source so The protocol issue with AOT is a bit frustrating. We end up having to AOT every bundle. This is acceptable to me as I have to bundlize every clojure dependency anyway. Would be nice to avoid it however. I'll share my bundling projects on GitHub anyway so you can see how I'm dealing with transitive dependencies and sources. Paudi On 17 Mar 2012, at 05:04, Mark Derricutt m...@talios.com wrote: Awesome. I see you're using the dependency plugin to only copy your specific AOT classes, I should really update the clojure-maven-plugin to only copy the discovered namespaces along. I remember Chas raised a bug years ago to fix this in the actual clojure compiler but I don't think it ever got resolved Since we're doing OSGi at work and we're wanting to integrate clojure I'm sure I'll be playing with your plugin soon :) On 17/03/12 10:48 AM, Patrick Moriarty wrote: I've posted the results in 2 posts on the topic if anyone is interested. I've spent quite a lot of time with Clojure and OSGi lately and have had some success in using Bnd and tools.namespace to generate a manifest for my mixed Clojure/Java project. I'm using clojure.osgi successfully to handle using requiring and loading clojure namespaces and to register and track OSGi services. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Persistent collections and garbage collection
Hi Ron, I think the persistent collections are no different from any other collections from a GC perspective in that you control which references you keep and for how long in your code. After modification some nodes may no longer be referenced and will be eligible for GC so I'm not sure what you mean by not necessarily short lived. Surely what is short lived is completely dependent on the use case? Also, since they are sharing structure they must be better than copy-on-write collections for object creation. That is the whole point. Obviously, compared to mutable collections there is some overhead due to additional node creation but that's a trade off and not relevant to your point about long lived objects. Paudi On 7 February 2012 16:16, pron ron.press...@gmail.com wrote: Hi. I have a question: I love Clojure's persistent collections, but don't they generate many long-lived objects (that go to the surving generations) that are hard to garbage-collect? After all, the discarded nodes after modification are not necessarily short lived. It seems like they would behave badly from the GC perspective. Am I wrong? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: New to Clojure
And don't forget 'How to Design Programs' - http://www.htdp.org Paudi On 9 June 2011 11:04, Bhinderwala, Shoeb sabhinderw...@wellington.comwrote: To start thinking functionally, I would also highly recommend reading the book Structure and Interpretation of Computer Programs: http://mitpress.mit.edu/sicp/ http://en.wikipedia.org/wiki/Structure_and_Interpretation_of_Computer_Programs This book is available freely at the above sites. A better typeset format in PDF is available at (docs.google.com): https://docs.google.com/viewer?a=vpid=explorerchrome=truesrcid=0BxVCLS4f8Sg5OGUwMmZlZjYtZWQ4Zi00ZThmLWFkMjYtNTIxZmY4ODhjNDdlhl=enauthkey=CLnyyF4 Thanks Shoeb -Original Message- From: clojure@googlegroups.com [mailto:clojure@googlegroups.com] On Behalf Of hci Sent: Wednesday, June 08, 2011 3:33 PM To: Clojure Subject: Re: New to Clojure I was in the same boat last year. My experience with Clojure started with Java interop, by writing Clojure code to solve some small problems using existing Java libraries. For example, I used Clojure to fetch and process application logs in a MySQL database and visualize the results with a Java graph library. These experience got me into productive mode quickly and became familiar with the syntax of the language. However, I was not transformed into a Clojure programmer by just doing Java-interop because I was still thinking in Java way. It should be noted that the Clojure way is very different from the Java way. A transformation in thinking is necessary. I did the transformation by studying the Joy of Clojure book and did programming exercise on 4clojure.com. The former showed me the Clojure way and I practiced walking the way with the later. A good thing about 4clojure.com is that there is an immediate feedback on how well one does. The code either pass the unit tests or not. If it passes, one can see how short their own code compared with others. In searching a shorter solution, one often learns some functional tricks. Also, the site forces one to work with core Clojure functions only, and the use of def is not allowed. On Jun 7, 12:30 pm, Santosh M santoshvmadhyas...@gmail.com wrote: I want to learn clojure. I already know Java. Please tell me how to proceed. Regards Santosh -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en