Hi,
Sometimes I receive the error ""The data area passed to a system call is too small" on a
task.
TaskInfo:
I have a task with a single line. It uses the the Action "Run Program as User" to execute a .bat file.
("C:\Company_TC_comm_plate.bat")
In this .bat file is a single line calling a .sql file
(sqlplus -s user/pswd@PMOB @C:\ROBOTASK\OracleScripts\Company_TC_Comm_Plate.sql
This sql file contains a spool operation on the database.
The task is executed every day at 5:00:00
Occurence:
The error does not occur every time the task is executed.
Sometimes the task is executed fine for several days.
After that it can go wrong for 2 days in a row.
Environment:
Robotask is running on a WINDOWS SERVER 2008 R2 which is a virtual machine running on VMWARE.
Debugging:
I've used an API monitor to see which calls were being made to the operating system and the Robotask files.
The API monitor showed an error in the file "C:\Program Files (x86)\RoboTask\Plugins\ForNT\ForWinNT.rpt".
"122 = The Data area passed to a system call is too small => STATUS_BUFFER_TOO_SMALL"
I've also checked if other processes interfere at the time the task is executed, but I couldn't find any.
Cause:
Any suggestions about the cause of the error?
Has it got something to do with the length of the filename of the .bat file?
Thanks in advance.
The data area passed to a system call is too small
The data area passed to a system call is too small
Last edited by fodmob on Mon Apr 15, 2013 7:50 am, edited 2 times in total.
Re: The data area passed to a system call is too small
Thank you for your report, we'll investigate the problem.
But I have one advice:
"Run program as user" action requires executable file as "Program name" parameter.
.BAT (or .CMD) is only a script for command interpreter (command processor).
So I recommend you to use such command line (use 2-nd copy of command processor):
cmd.exe /c "C:\Company_TC_comm_plate.bat"
put cmd.exe into Program name field
and rest string (/c "C:\Company_TC_comm_plate.bat") into Parameters.
But I have one advice:
"Run program as user" action requires executable file as "Program name" parameter.
.BAT (or .CMD) is only a script for command interpreter (command processor).
So I recommend you to use such command line (use 2-nd copy of command processor):
cmd.exe /c "C:\Company_TC_comm_plate.bat"
put cmd.exe into Program name field
and rest string (/c "C:\Company_TC_comm_plate.bat") into Parameters.
Oleg Yershov
Re: The data area passed to a system call is too small
Hi Oleg,
thanks for the fast reply.
I will try out your advice and will see what effect it has on the execution.
thanks for the fast reply.
I will try out your advice and will see what effect it has on the execution.
Re: The data area passed to a system call is too small
Hi Oleg,
Thanks for you fast reply.
I will try out your advice and look what the effect is on the output.
Thanks for you fast reply.
I will try out your advice and look what the effect is on the output.
Re: The data area passed to a system call is too small
Hi Oleg,
I've tried to execute the bat file as you described in your answer:
I still keep getting the error.
Were you able to reproduce the problem?
I've tried something else:
1. Installed Robotask 5.4 on a stand-alone Windows 7 machine.
2. Then installed Robotask as a NT service and in the service-mode I've created a single task with a single line "RUN PROGRAM AS USER" and the following settings:
Program name: "C:\Windows\System32\cmd.exe"
Parameters: /C "C:\ROBOTASKTEST\test.bat"
Wait until program exits: checked
3.Contents of test.bat (echo test) -> a single line
4. Trigger Events: Cyclic (every 2 seconds)
Result: after running this task for 30 minutes until 1 hour on the Windows 7 system, I get the error: "The parameter is incorrect".
A complete computer reboot is needed to get the task working again. (Restarting the service is not enough)
I did the same test on a stand-alone Windows XP machine. After 3 minutes, I get the error: "not enough quota is available to process this command"
No other applications were running when this test was done. I've tried to enlarge the paging file size but the result was still the same.
I've tried to execute the bat file as you described in your answer:
I still keep getting the error.
Were you able to reproduce the problem?
I've tried something else:
1. Installed Robotask 5.4 on a stand-alone Windows 7 machine.
2. Then installed Robotask as a NT service and in the service-mode I've created a single task with a single line "RUN PROGRAM AS USER" and the following settings:
Program name: "C:\Windows\System32\cmd.exe"
Parameters: /C "C:\ROBOTASKTEST\test.bat"
Wait until program exits: checked
3.Contents of test.bat (echo test) -> a single line
4. Trigger Events: Cyclic (every 2 seconds)
Result: after running this task for 30 minutes until 1 hour on the Windows 7 system, I get the error: "The parameter is incorrect".
A complete computer reboot is needed to get the task working again. (Restarting the service is not enough)
I did the same test on a stand-alone Windows XP machine. After 3 minutes, I get the error: "not enough quota is available to process this command"
No other applications were running when this test was done. I've tried to enlarge the paging file size but the result was still the same.
Re: The data area passed to a system call is too small
I composed the test and I'm trying it now
Oleg Yershov
Re: The data area passed to a system call is too small
We have reproduced your problem.
We made some corrections in Run as User action. I hope this solve the problem.
Try to install the patch #2 for RoboTask 5.4
We tested "Run as User" action in the loop.
This is working stably after several thousands iterations. Previous version raises an error after 900-1200 iterations.
Also you can try newest version of RoboTask (5.6): http://www.robotask.com/downloads/
See feature history here: http://www.robotask.com/forum/viewtopic.php?f=1&t=1507
We made some corrections in Run as User action. I hope this solve the problem.
Try to install the patch #2 for RoboTask 5.4
We tested "Run as User" action in the loop.
This is working stably after several thousands iterations. Previous version raises an error after 900-1200 iterations.
Also you can try newest version of RoboTask (5.6): http://www.robotask.com/downloads/
See feature history here: http://www.robotask.com/forum/viewtopic.php?f=1&t=1507
Oleg Yershov
Re: The data area passed to a system call is too small
Hi Oleg,
I've tested the "Run As User" action on a Windows 7 platform (ROBOTASK running as an NT service).
And as far as I can tell, it is looking fine now.
I've also tested "Run As User" on a Windows Server 2008 R2 (running on VMWARE), and I keep getting "Access is denied" messages
when executing a .bat file.
First I thought it was a user rights problem but I elevated the user rights to Admin rights.
So ROBOTASK service is logged on with Admin rights and also "Run as User" action is executed with the same Admin rights.
I've tested the "Run As User" action on a Windows 7 platform (ROBOTASK running as an NT service).
And as far as I can tell, it is looking fine now.
I've also tested "Run As User" on a Windows Server 2008 R2 (running on VMWARE), and I keep getting "Access is denied" messages
when executing a .bat file.
First I thought it was a user rights problem but I elevated the user rights to Admin rights.
So ROBOTASK service is logged on with Admin rights and also "Run as User" action is executed with the same Admin rights.
Re: The data area passed to a system call is too small
If you use authentication parameters in system service mode you should turn OFF "Logon task as user" parameter of the task.

This parameter is ON by default and "Run Program as user" action always returns "Access denied" in this case.
I wrote about this not long ago: http://www.robotask.com/forum/viewtopic ... 1502#p4542

This parameter is ON by default and "Run Program as user" action always returns "Access denied" in this case.
I wrote about this not long ago: http://www.robotask.com/forum/viewtopic ... 1502#p4542
Oleg Yershov
Re: The data area passed to a system call is too small
I've just tested this on 2008 R2
It works exactly as on Windows 7
It works exactly as on Windows 7
Oleg Yershov