[JIRA] [core] (JENKINS-30782) Failed to read environment variable table error

47 views
Skip to first unread message

g.manisankar@gmail.com (JIRA)

unread,
Oct 4, 2015, 9:56:01 PM10/4/15
to jenkinsc...@googlegroups.com
mani sankar created an issue
 
Jenkins / Bug JENKINS-30782
Failed to read environment variable table error
Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 05/Oct/15 1:55 AM
Environment: org.jvnet.winp.WinpException: Failed to read environment variable table error=299 at .\envvar-cmdline.cpp:201
Priority: Major Major
Reporter: mani sankar

I have checked for this defect online but couldn't get a solution. The job doesn't terminate the job correctly. The Jenkins version is the latest one.

The error that I get is ERROR: Build step failed with exception
org.jvnet.winp.WinpException: Failed to read environment variable table error=299 at .\envvar-cmdline.cpp:201
at org.jvnet.winp.Native.getCmdLineAndEnvVars(Native Method)
at org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:126)
at org.jvnet.winp.WinProcess.getCommandLine(WinProcess.java:102)
at org.jvnet.winp.WinProcess.killRecursively(WinProcess.java:66)
at hudson.util.ProcessTree$Windows$1.killRecursively(ProcessTree.java:425)
at hudson.util.ProcessTree.killAll(ProcessTree.java:141)
at hudson.Proc$LocalProc.destroy(Proc.java:379)
at hudson.Proc$LocalProc.join(Proc.java:352)
at hudson.Launcher$ProcStarter.join(Launcher.java:389)
at hudson.tasks.Ant.perform(Ant.java:217)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.Build$BuildExecution.build(Build.java:205)
at hudson.model.Build$BuildExecution.doRun(Build.java:162)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
at hudson.model.Run.execute(Run.java:1741)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:408

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

g.manisankar@gmail.com (JIRA)

unread,
Oct 5, 2015, 3:46:20 AM10/5/15
to jenkinsc...@googlegroups.com
mani sankar updated an issue
Change By: mani sankar
I have checked for this defect online but couldn't get  a solution. The job doesn't terminate the job correctly. The Jenkins version is the latest one.  Some more details are

Environment - Windows 7
Jenkins service is started with my user id and pasword.

g.manisankar@gmail.com (JIRA)

unread,
Oct 7, 2015, 9:27:02 AM10/7/15
to jenkinsc...@googlegroups.com
mani sankar commented on Bug JENKINS-30782
 
Re: Failed to read environment variable table error

I changed the default ant configuration in jenkins job to a custom installation and that worked. But this issue should not still appear if the default jenkins is used.

o.v.nenashev@gmail.com (JIRA)

unread,
Dec 9, 2016, 5:05:01 PM12/9/16
to jenkinsc...@googlegroups.com

The issue still exists from what I see

This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

o.v.nenashev@gmail.com (JIRA)

unread,
Feb 27, 2017, 11:47:01 AM2/27/17
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Feb 27, 2017, 12:11:01 PM2/27/17
to jenkinsc...@googlegroups.com
Oleg Nenashev started work on Bug JENKINS-30782
 
Change By: Oleg Nenashev
Status: Open In Progress

o.v.nenashev@gmail.com (JIRA)

unread,
Feb 27, 2017, 12:11:02 PM2/27/17
to jenkinsc...@googlegroups.com
 
Re: Failed to read environment variable table error

So JENKINS-8614 just worked around the issue in tests.
From what I see, the shortcut is to just disable FINE logging for the class https://github.com/kohsuke/winp/blob/master/src/main/java/org/jvnet/winp/WinProcess.java#L66
Working on a better solution

o.v.nenashev@gmail.com (JIRA)

unread,
Feb 27, 2017, 1:34:01 PM2/27/17
to jenkinsc...@googlegroups.com

Disclaimer: the workaround above applies only to that particular stacktrace, it does not help in the case of other failures, e.g.

org.jvnet.winp.WinpException: Failed to read environment variable table error=299 at .\envvar-cmdline.cpp:201 
at org.jvnet.winp.Native.getCmdLineAndEnvVars(Native Method) 
at org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:126) 
at org.jvnet.winp.WinProcess.getEnvironmentVariables(WinProcess.java:121) 
at hudson.util.ProcessTree$Windows$1.getEnvironmentVariables(ProcessTree.java:452) 
at hudson.util.ProcessTree$OSProcess.hasMatchingEnvVars(ProcessTree.java:276) 
at hudson.util.ProcessTree$Windows.killAll(ProcessTree.java:478) 
at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:965) 
at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:956) 
at hudson.remoting.UserRequest.perform(UserRequest.java:121) 
at hudson.remoting.UserRequest.perform(UserRequest.java:49) 
at hudson.remoting.Request$2.run(Request.java:325) 
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) 
at java.util.concurrent.FutureTask.run(Unknown Source) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
at hudson.remoting.Engine$1$1.run(Engine.java:69) 
at java.lang.Thread.run(Unknown Source)

I will check if there is a better solution I could apply

o.v.nenashev@gmail.com (JIRA)

unread,
Feb 27, 2017, 1:35:02 PM2/27/17
to jenkinsc...@googlegroups.com
Oleg Nenashev edited a comment on Bug JENKINS-30782
Disclaimer: the workaround above applies only to that particular stacktrace in the issue description , it does not help in the case of other failures, e.g.

{noformat}

org.jvnet.winp.WinpException: Failed to read environment variable table error=299 at .\envvar-cmdline.cpp:201
at org.jvnet.winp.Native.getCmdLineAndEnvVars(Native Method)
at org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:126)
at org.jvnet.winp.WinProcess.getEnvironmentVariables(WinProcess.java:121)
at hudson.util.ProcessTree$Windows$1.getEnvironmentVariables(ProcessTree.java:452)
at hudson.util.ProcessTree$OSProcess.hasMatchingEnvVars(ProcessTree.java:276)
at hudson.util.ProcessTree$Windows.killAll(ProcessTree.java:478)
at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:965)
at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:956)
at hudson.remoting.UserRequest.perform(UserRequest.java:121)
at hudson.remoting.UserRequest.perform(UserRequest.java:49)
at hudson.remoting.Request$2.run(Request.java:325)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1$1.run(Engine.java:69)
at java.lang.Thread.run(Unknown Source)
{noformat}


I will check if there is a better solution I could apply

o.v.nenashev@gmail.com (JIRA)

unread,
Mar 24, 2017, 1:08:05 PM3/24/17
to jenkinsc...@googlegroups.com

I am currently working on the fix. I wish I could just take the implementation from processhacker2 "https://github.com/processhacker2/processhacker2/blob/69d9dcd2c79d52ce987cc8f0150f639426eb67f9/phlib/native.c#L867-L990", but it cannot be done since the code there is GNU GPL. Will consider alternatives

This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

o.v.nenashev@gmail.com (JIRA)

unread,
Mar 31, 2017, 12:38:04 PM3/31/17
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages