Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Hi there,

      I've got a strange error/race condition in my app which occurs in the jmx gem:

      It occurs here: https://github.com/enebo/jmxjr/blob/master/lib/jmx.rb#L163
      Without any special treatment, it complains that a Proc is expected, but a string was given.

      If I change this to
      self.class._send_(:define_method, rname, Proc.new

      { self[attr.name] }

      )

      The exception changes and it complains that define_method does not exist on the instance, even if self.class is begin called.

      If I change _send_ to send the exception disappears.

      The funny thing is, that another exception appears afterwards, in a totally different place.

      I guess this might be some strange scoping problem.
      I cant cleanly reproduce this, but could provide access to the machine.

      -Tobias

        Activity

        Hide
        Tobias Schlottke added a comment -

        Sorry, I left out the details.

        It is jruby 1.6.7 (ruby-1.9.2-p312) (2012-02-27 3e82bc8) (Java HotSpot(TM) 64-Bit Server VM 1.7.0_02)

        Happens with java 6 aswell.

        Show
        Tobias Schlottke added a comment - Sorry, I left out the details. It is jruby 1.6.7 (ruby-1.9.2-p312) (2012-02-27 3e82bc8) (Java HotSpot(TM) 64-Bit Server VM 1.7.0_02) Happens with java 6 aswell.
        Hide
        Tobias Schlottke added a comment -

        I guess it is a pure threading problem as the JMX gem seems to be not-that-threadsafe...

        Show
        Tobias Schlottke added a comment - I guess it is a pure threading problem as the JMX gem seems to be not-that-threadsafe...

          People

          • Assignee:
            Thomas E Enebo
            Reporter:
            Tobias Schlottke
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: