Page 1 of 2
The data area passed to a system call is too small
Posted: Wed Apr 03, 2013 8:17 am
by fodmob
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.
Re: The data area passed to a system call is too small
Posted: Wed Apr 03, 2013 8:50 am
by Oleg
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.
Re: The data area passed to a system call is too small
Posted: Wed Apr 03, 2013 9:11 am
by fodmob
Hi Oleg,
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
Posted: Wed Apr 03, 2013 9:19 am
by fodmob
Hi Oleg,
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
Posted: Wed Apr 10, 2013 12:59 pm
by fodmob
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.
Re: The data area passed to a system call is too small
Posted: Wed Apr 10, 2013 1:40 pm
by Oleg
I composed the test and I'm trying it now
Re: The data area passed to a system call is too small
Posted: Sat Apr 13, 2013 12:00 pm
by Oleg
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
Re: The data area passed to a system call is too small
Posted: Tue Apr 16, 2013 9:54 am
by fodmob
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.
Re: The data area passed to a system call is too small
Posted: Tue Apr 16, 2013 10:48 am
by Oleg
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
Re: The data area passed to a system call is too small
Posted: Tue Apr 16, 2013 10:54 am
by Oleg
I've just tested this on 2008 R2
It works exactly as on Windows 7