OpenBSD Journal

Developer blog: kurt@ - a year in the life of a developer

Contributed by deanna on from the making-the-impossible-happen dept.

Kurt Miller (kurt@) writes:

For the last year or so I've been quite busy working on various things that have caught my interest. Early last year I made OpenBSD my primary desktop. That led me down a path that I hardly anticipated but has been quite rewarding... While working on the devel/eclipse port, I began taking an interest in www/mozilla which eclipse depends on. I was building it from source regularly so I started looking at some of the stability issues with it. One of the key stability problems was caused by a bug in our runtime linker ld.so(1) - closing a dlopen'ed object that was a dependency of another object would cause the application to crash. All the mozilla.org applications suffered from this bug so I committed a workaround that stopped them from doing that.

Later drahn@ fixed the ld.so problem and the workaround was removed, but that debugging experience along with some previous ld.so porting work I did for Java had me debugging ld.so issues and becoming more familiar with it. When some dlsym(3) changes were proposed that broke the Java ports, I got involved with a rather significant rewrite of ld.so's symbol visibility internals. Working closely with Dale we overhauled ld.so for 3.9-release. That overall paved the way for me to remove all remaining OpenBSD ld.so related workarounds in the ports tree.

In the 4.0 development cycle my attention went back to Java on OpenBSD and elsewhere. Using some bootstrap tricks I broke 1.5's build dependency on devel/jdk/1.4 by using kaffe. This was significant because it broke the chain of dependencies that ultimately depended on Linux emulation (i386 only) and paved the way for 1.5 to run on other architectures. Working with ian@ (who has an amd64) we got kaffe and 1.5 running on amd64. Access to an amd64 system was provided to me by a kindly OpenBSD user and the kinks were worked out with the eclipse build there. So for 4.0 we will see both devel/jdk/1.5 and devel/eclipse running on amd64.

Also I worked on javaPathHelper which will help make Java ports on OpenBSD work consistently. I expanded the Java module to add kaffe and jamvm as possible packages for satisfying the RUN_DEPENDS for 1.4 and below level ports. For example, if you want to work with just kaffe on OpenBSD, just install it before installing other Java ports like apache-ant and ant will be smart enough to use kaffe. However, if you've got multiple jdk's or jre's installed it would be a good idea to setup your environment vars (JAVA_HOME and/or JAVACMD) to explicitly control which one is used.

Also noteworthy in the Java area; I applied to the Sun scholarship program to get access to the test kit for our devel/jdk/1.5 port. I was approved by the committee but the licensing phase has been dragging along at a snail's pace. Hopefully, in the next month or two that will be resolved.

A few weeks ago I started working on robert@'s OpenOffice port. After fixing some minor issues I started debugging the final two showstopper bugs that prevented the build from finishing. The first one was caused by a conflict between the internal libz in devel/jdk/1.4 and our libz linked into OOo. The second one was due to our not having getpwuid_r. With corrections to both of those issues and few other minor corrections, OOo was at least able to launch most of the applications and was imported into our ports tree. It still needs work before it's fully ready for general use, but it's now in a place where anyone who wants to can get involved with it.

Well that about covers most of the highlights of the last year or so. I use KDE for my desktop and an assortment of other applications on a daily basis. They all work exceedingly well.

(Comments are closed)


Comments
  1. By Anonymous Coward (87.194.34.157) on

    So that explains some of what "Our own ports tree which has improved an insane amount since OpenBSD 3.9" is all about :)


  2. By kamper (74.114.186.166) on

    You rock. This is some cool stuff to read.

    A couple of q's:
    -Does the exact same codebase handle both the i386 and amd64 ports of java? Any idea how the jit compiler handles that? Does it generate 32bit code on am64 or does it adapt? How many more architectures can you reach? I assume that the sparc code is available from sun too.

    -After getting the sun test kit worked through, will OpenBSD have the same status as FreeBSD with regards to java? They made such a big deal about being certified... Please post again on the testing process and mention if there's anything us little folks can help with.

    -Do you have any knowledge of how the java port handles threading? Is it all internal or does it depend on pthreads or anything like that? Is there any benefit from the rthreads work going on?

    Thanks a tonne and keep up the good work!!

    Comments
    1. By tedu (67.125.184.114) on

      cutting in to answer the easy one: java uses libpthread to provide threads. 1.3 could use its own thread library "green threads", but this is not an option with jit or the newer versions. any improvements to our thread library will improve java. (java should work with rthreads; it was responsible for quite a few enhancements and fixes).

      Comments
      1. By kamper (74.114.186.166) on

        > cutting in to answer the easy one: java uses libpthread to provide threads. 1.3 could use its own thread library "green threads", but this is not an option with jit or the newer versions. any improvements to our thread library will improve java. (java should work with rthreads; it was responsible for quite a few enhancements and fixes).

        Ok, another one since they're so easy :p

        Does it map threads 1:1 to pthreads and pass all the scheduling to the operating system?

        Comments
        1. By tedu (67.125.184.114) on

          each java thread is a native thread

    2. By Anonymous Coward (69.122.119.232) on

      In order to do a binary releases we would need the proper legal structure (Foundation / non-profit or the like) and funding to put it off. Until that happens I'd like to get the test kit so I can find any remaining issues and fix them under the current port structure. Access to the test kit would be restricted to only licensed individuals so there isn't anything users could do to help that process along.

      The codebase is largely shared, but there are architecture specific parts in hotspot. The bytecode on amd64 is the same as on i386. So take your jar file that was compiled on any OS/architecture and it will run on OpenBSD/amd64 too.

      tedu answered your thread questions - I'll just add rthreads will allow java processes to take advantage of more then one CPU so that will be nice to have.

      Comments
      1. By kamper (131.104.10.70) on

        > In order to do a binary releases we would need the proper legal structure (Foundation / non-profit or the like) and funding to put it off. Until that happens I'd like to get the test kit so I can find any remaining issues and fix them under the current port structure. Access to the test kit would be restricted to only licensed individuals so there isn't anything users could do to help that process along.
        >

        Doesn't seem worthwhile to set up a foundation just for the sake of java certification, given the amount of resistance to it in the past. I'd be happy with your word that it passes the tests, although I suppose that might be a problem for some folks.

        > The codebase is largely shared, but there are architecture specific parts in hotspot. The bytecode on amd64 is the same as on i386. So take your jar file that was compiled on any OS/architecture and it will run on OpenBSD/amd64 too.
        >

        Well yes, obviously bytecode is the same on any architecture :p I was just curious about the machine code generated at runtime.

        > tedu answered your thread questions - I'll just add rthreads will allow java processes to take advantage of more then one CPU so that will be nice to have.
        >

        Thanks for your responses. Most informative.

  3. By umaxx (141.89.59.7) on

    thanks for your hard work! just great!

    one question:
    will devel/jdk/1.5 be available for ppc too (sometimes)?

    Comments
    1. By Kurt Miller (69.122.119.232) on

      Sorry no - that is unless someone wants to write the arch specific parts for hotspot.

      1.3 can be made to run in classic mode on just about any 32-bit arch. It currently runs on arm i386 powerpc sparc for example. However beginning with 1.4, classic mode is gone and there must be a hotspot implemention available to complete a port to a new arch. 1.5 can be ported to sparc64 once there is a working bootstrap vm and tools available (kaffe / sablevm-sdk / etc.).

  4. By Anonymous Coward (70.48.228.133) on

    Speaking of the www/mozilla port. The comment says it's a redesign of Mozilla's browser, and there are 35 patches in the patches/ directory. This is great, thank you, it's obvious that a lot of work has gone into this port.

    Lately Mozilla has been vocal about their trademark being used on modified versions of the browser; see, for example

    http://www.internetnews.com/dev-news/article.php/3634591

    Unless I am misinterpreting this, it seems it would be wise for OpenBSD to rename this port and remove the Mozilla trademark.

    It would also have the bonus effect of owning the work you've done. :)

    Comments
    1. By SH (82.182.103.172) on

      > Unless I am misinterpreting this, it seems it would be wise for OpenBSD to rename this port and remove the Mozilla trademark.

      On ports@ the name Burning Dog was suggested ;-)

    2. By Kurt Miller (69.122.119.232) on

      The article you posted discusses the Firefox trademark. When the Mozilla Foundation began enforcing its Firefox trademark rights, we promptly adjusted our Firefox port to use "Firefox Community Edition" and the icon without the red fox on it. According to their guidelines at the time this was how you could distribute Firefox. AFAIK, this has not changed and we are still in good shape.

      Comments
      1. By jolan@ (209.242.13.234) on

        > The article you posted discusses the Firefox trademark. When the Mozilla Foundation began enforcing its Firefox trademark rights, we promptly adjusted our Firefox port to use "Firefox Community Edition" and the icon without the red fox on it. According to their guidelines at the time this was how you could distribute Firefox. AFAIK, this has not changed and we are still in good shape.

        i put in a request almost 5 months ago with the mozilla guys for permission to use --official-branding and the last response i received was:

        ------- Comment #8 From Gervase Markham 2006-07-10 02:16 PDT [reply] -------

        Jolan: I have been attempting to get the right people within the Mozilla
        Corporation to find time to consider this and other related issues (there are
        several other people asking for permission for their distributions), but
        clearly have not yet been successful.

        Gerv

        quite sad that they enforce their trademark and then don't have a process in place to give permission :(

        Comments
        1. By Anonymous Coward (76.3.196.122) on

          > i put in a request almost 5 months ago with the mozilla guys for permission to use --official-branding and the last response i received was:
          >
          > ------- Comment #8 From Gervase Markham 2006-07-10 02:16 PDT [reply] -------
          >
          > Jolan: I have been attempting to get the right people within the Mozilla
          > Corporation to find time to consider this and other related issues (there are
          > several other people asking for permission for their distributions), but
          > clearly have not yet been successful.
          >
          > Gerv
          >
          > quite sad that they enforce their trademark and then don't have a process in place to give permission :(

          What's the bug number?

          Comments
          1. By jolan@ (71.82.175.104) on

            336371

  5. By Chris Humphries (66.197.191.126) chris@unixfu.net on http://unixfu.net/

    Thanks Kurt!

    I appreciate the work done in Java by you (and others). Looking forward to thread changes and Sun certification. Also a process to better get updates to versions or whatever can get them done easier/faster/better.

    If I was rich, I'd fund you to work on Java for OpenBSD :D

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]