Hitachi Vantara Pentaho Community Forums
Results 1 to 10 of 10

Thread: Job hangs and does nothing

  1. #1
    Join Date
    Mar 2009
    Posts
    10

    Default Job hangs and does nothing

    Hi everyone,

    I am currently using kettle for some batch job for backend processes. I am having trouble with the inconsistent behavior of kettle. Quite a few of my job have gave this output before it hangs

    env: DEC set Var is a modified javascript step
    Code:
    var converted = java.custom.Class.convertValue(currentValue.getString()) 
    setVariable(reference.getString(),converted,'s')
    INFO 03-04 11:10:04,296 - env: DEC Set Var.0 - No starting Script found!
    INFO 03-04 11:10:04,321 - env:Set starttime.0 - No starting Script found!
    INFO 03-04 11:10:04,355 - env: DEC Set Var.0 - No tran_Status found. Transformation status checking not available.
    [GC 6144K->3789K(8640K), 0.0000000 secs]
    INFO 03-04 11:10:04,507 - env:Set starttime.0 - No tran_Status found. Transformation status checking not available.


    Can anyone give me some pointers pls? thanks
    Last edited by tienaik; 04-03-2009 at 05:41 AM.

  2. #2
    Join Date
    Mar 2009
    Posts
    10

    Default

    Modified JavaScript also hangs quite frequently when i call this piece of code

    Code:
    var starttime = new java.sql.Timestamp(java.lang.System.currentTimeMillis())
    --
    Fieldname    Rename to    Type    Length    Precision
    starttime                       Date

    Any idea?

  3. #3
    Join Date
    May 2006
    Posts
    4,882

    Default

    Nope, haven't seen any of those yet.

    Which version?

    And if you can make it happen consistently, simplify your transformation (no database inputs/outputs e.g.), and attach it

  4. #4
    Join Date
    Mar 2009
    Posts
    10

    Default

    I am using PDI 3.1

    Well the problem is its not consistent @@ but it happens rather frequently
    i schedule it to run on crontab and occassionally one of them hangs

    Well sample is here, hope it helps

    And i figured out that this signaling done line is usually missing when the job hangs... althought all the rows are process...
    DEBUG 03-04 18:11:06,506 - CreateStats:Set Variable.0 - Signaling 'output done' to 0 output rowsets.

    And it is not a no row input causing the transformation to hang.. there are always input since im reading from a property file
    Attached Files Attached Files
    Last edited by tienaik; 04-07-2009 at 09:45 PM.

  5. #5
    Join Date
    Mar 2009
    Posts
    10

    Default

    Well i changed the processRow method in the ScriptValuesMod class, it looks like it dont hang so often anymore. I will monitor and see what happens next.

    Code:
        Object[] r = getRow(); // Get row from input rowset & set row busy!
        if (r == null) {
          //Modification for Additional End Function
          try {
            if (data.cx != null) {
              // Checking for EndScript
              if (strEndScript != null && strEndScript.length() > 0) {
                Script endScript = data.cx.compileString(strEndScript, "trans_End", 1, null);
                endScript.exec(data.cx, data.scope);
                if (log.isDetailed())
                  logDetailed(("End Script found!"));
              } else {
                if (log.isDetailed())
                  logDetailed(("No end Script found!"));
              }
            }
          } catch (Throwable e) {//change to throwable
            logError(Messages.getString("ScriptValuesMod.Log.UnexpectedeError") + " : " + e.toString()); //$NON-NLS-1$ //$NON-NLS-2$                
            logError(Messages.getString("ScriptValuesMod.Log.ErrorStackTrace") + Const.CR + Const.getStackTracker(e)); //$NON-NLS-1$
            setErrors(1);
            stopAll();
          }
          finally{ //added finally
              if (data.cx != null) Context.exit();
              setOutputDone();
              return false;
          }
        }

  6. #6
    Join Date
    Mar 2009
    Posts
    10

    Default

    Well that dont seems to help, the transformation seems completed but it didnt continue with the rest of the job and hangs..
    Some cases even if the transformation calls the abort step, it still cannot kill the transformation
    Any one have any idea?
    Last edited by tienaik; 04-07-2009 at 09:45 PM.

  7. #7
    Join Date
    Mar 2009
    Posts
    10

    Default

    After a little( a couple of hours ) of debugging.. i manage to trace the code until the point that it hangs and stop responding..
    This part is from BaseStep
    Code:
                log.logMinimal(toString(), "Get rows....");
                // Get a row from the input in row set ...
                // Timeout almost immediately if nothing is there to read.
                // We will then switch to the next row set to read from...
                //
                row = inputRowSet.getRowWait(1, TimeUnit.MILLISECONDS);
                log.logMinimal(toString(), "got row wait...");
    it seems that the blocking queue timeout is not working, it hung and nvr came back..
    my log:
    Code:
    INFO: env:DEC Set Var.0 - not empty continue..
    INFO: env:DEC Set Var.0 - Get rows....
    INFO: rj:Environment - waiting for Environment
    INFO: rj:Environment - waiting for Environment (continue printing these forever...)
    Waiting for environment comes from JobEntryTrans

    Code:
                        try {
                            // Start execution...
                            //
                            trans.execute(args);
    
                            // Wait until we're done with it...
                            //TODO: waiting here?
                            String text = "waiting for " + trans.getName( );
                            String subject = toString();
                            while (!trans.isFinished() && !parentJob.isStopped() && trans.getErrors() == 0)
                            {
                                log.logBasic(subject, text );
                                try { Thread.sleep(0,500);}
                                catch(InterruptedException e) { }
                            }
    I am using this vm to run this transformation...

    java version "1.5.0_16"
    Java(TM) Platform, Standard Edition for Business (build 1.5.0_16-b02)
    Java HotSpot(TM) Server VM (build 1.5.0_16-b02, mixed mode)

  8. #8
    Join Date
    Mar 2009
    Posts
    10

    Default

    I guess this is the bug i am looking for:
    http://bugs.sun.com/bugdatabase/view...bug_id=6807483

    ArrayBlockingQueue poll will get a lock via ReentrantLock then wait with Condition.awaitNanos(time)

    Its a jdk bug

    Any suggestion to over come this problem?

  9. #9
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Updating your JVM sounds like a good idea.

  10. #10
    Join Date
    Mar 2009
    Posts
    10

    Default

    I still have doubts though, it usually hangs after finish all the rows and without
    Signaling 'output done' to 1 output rowsets
    Maybe something wrong with the wrapping up part... and its usually the script_value_mod.. All of these.. too many coincidences.

    I wonder why it didnt hang while there are still rows to be process..
    Last edited by tienaik; 04-13-2009 at 01:57 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.