Solaris 9 32-bit application 256 descriptors

Hi,
There is a bug in Solaris, a 32-bit application running on 64-bit Solaris cannot open more than 256 descriptors. I read the article from Giri Mandalika http://developers.sun.com/solaris/articles/stdio_256.html. There is a solution for Solaris 10 described in that article. Is there any solution for Solaris 9? Was that solution backported to Solaris 9?
Any hint is appreciated.
Tomas

Hello.
This limitation is not a limitation of the Solaris operating system but of the libc library.
A simple workaround could be:
FILE *myfiles[1000];
int i;
// won't work if more than 256 files are open...
for(i=0;i<1000;i++) myfiles=fopen(names[i],"w");
for(i=0;i<1000;i++) fprintf(myfiles[i],"%u\n",i);
Workaround - NOT TESTED:FILE *f;
int myfiles[1000];
int i;
for(i=0;i<1000;i++) myfiles[i]=creat(names[i],0644);
for(i=0;i<1000;i++)
f=fdopen(dup(myfiles[i]),"w");
fprintf(f,"%u\n",i);
// fclose() will only close the handle duplicate returned by dup() !!
fclose(f);
-- EDIT --
Tested on Solaris 9/Sparc:
- You have to use "ulimit -n" to allow an application to use more than 256 file descriptors (maximum is 1024).
- If more than 256 files are open "dup" and "dup2" will cause an SIGSEGV - obviously a bug in Solaris.
  Maybe you can use the following combination instead of using "fprintf":len=sprintf(buffer,...);
write(file[i],buffer,len);
  I'm not sure if "write" etc. cause SIGSEGVs when more than 256 files are open.
Martin                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • How can I use syscall() from 32-bit application in 64-bit Solaris (v. 5.8)

    Solaris 5.8
    Sun Blade 150 (64-bit)
    I have got SYGSYS when call syscall(...) from my 32-bit application.
    Is it possible to use syscall() in 32-bit applications under 64-bit Solaris?

    Hello again.
    You may use the debugger (mdb) to open the core file generated by the SIGSYS trap:mdb coreThen you type::regs to list the register values at the time of the trap (in hexadecimal form).
    For Sparc machines (it is more complicated on x86 machines) g1 holds the system call number, o0 holds the first argument, o1 the second one ... o5 the 6th one. (For system calls with more than 6 arguments the 7th, 8th... argument are stored on the stack.)
    If g1 is 0 you know that the system call is done indirectly using SYS_syscall so the arguments are shifted (see above) and o0 holds the system call number.
    You can exit mdb using::quitMartin

  • Generating 32 bit applications on Solaris 9 / UltraSparc III+

    Hallo.
    I wish to generate some 32 bit applications on Solaris 9 and UltraSparc III+ platform. I need to do that as my process have to dinamically link a 32 bit shared object previosuly installed by another software (to be precise, the library is an "ELF 32-bit MSB dynamic lib SPARC Version 1, dynamically linked, not stripped").
    After my generation, some executables that runned perfectly on my previous UNIX SCO platform, now crash when exiting.
    Moreover I find out that my master process correctly launches the execution of a slave process (I traced the values of the paramters passed to the execv() system call) but the slave process immediatly exits because it gets wrong parameters (I found out that in the main() function within the slave program, the argc parameter is 0 (!!) that sounds really really strange!!)
    Is there anyone able to help me?
    For your information, when I compile my objects I use the following options:
    cc -g -xc99=none -xtarget=ultra -xchar -c <source>
    and when I link them I use the following:
    /usr/ccs/bin/ld -z defs -z verbose -dy -B dynamic -o <processname> <object list> <shared library> -lm -lc
    Doing so, both the master and slave process are "ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required, UltraSPARC1 Extensions Required, dynamically linked, not stripped"
    Thank you in advance!!
    Gianni

    Why do you want to make your own link lines?
    Use cc to link, not ld. You ask for trouble.
    I made the following program:
    int main(int argc, char **argv) { return argc;}
    % cc -c t.c
    Then used your link line to link it:
    % /usr/ccs/bin/ld -z defs -z verbose -dy -B dynamic -o a.out t.o -ln -lc
    % a.out
    Segmentation fault (core dumped)
    Use cc to link. Do not try to use ld. Or if you really, really think you have to use ld yourselves, run cc -### ... first to se what link line it uses, and try to make the variation you need yourselves. But all kind of options to ld can also be given to cc.

  • Porting 32-bit Applications on 64-bit Solaris 9i

    Hi All,
    I tried to port an existing and well set 32-bit application onto Solaris 9.While I was compling the C-code part of it,I encountered the error
    wrong ELF class: ELFCLASS64.
    which I realized was due to intermixing of 32 and 64-bit applications.
    I just wanted to know if any oracle 10g libraries called or linked with the application happen to be of 32-bit ELFCLASS as it's only while linking with them that the error is thrown.
    cc -L/u01/app/oracle/product/10.1.0.3/lib/ -L/u01/app/oracle/product/10.1.0.3/rdbms/lib -o cps_lib_test cps_lib_test.o -lclntsh `cat /u01/app/oracle/product/10.1.0.3/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/product/10.1.0.3/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lmm -lcore10 -lxml10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /u01/app/oracle/product/10.1.0.3/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/product/10.1.0.3/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lcore10 -lxml10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lcore10 -lxml10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /u01/app/oracle/product/10.1.0.3/lib/sysliblist` -R/u01/app/oracle/product/10.1.0.3/lib -laio -lposix4 -lkstat -lm -lthread cps_lib.so
    ld: fatal: file cps_lib_test.o: wrong ELF class: ELFCLASS64
    ld: fatal: File processing errors. No output written to cps_lib_test
    *** Error code 1
    make: Fatal error: Command failed for target `build'
    Can someone please help?

    Sorry for the i attached to Solaris 9.
    The output of file cps_lib_test.o is ELF 64-bit MSB relocatable SPARC Version 1.
    Almost all the resulting files are of the type ELFCLASS64.But probably some of the oracle libraries while linking are causing the problem.

  • Porting 32-bit Applications on 64-bit Solaris 9

    Hi All,
    I tried to port an existing and well set 32-bit application onto Solaris 9.While I was compling the C-code part of it,I encountered the error
    wrong ELF class: ELFCLASS64.
    which I realized was due to intermixing of 32 and 64-bit applications.
    I just wanted to know if any oracle 10g libraries called or linked with the application happen to be of 32-bit ELFCLASS as it's only while linking with them that the error is thrown.
    cc -L/u01/app/oracle/product/10.1.0.3/lib/ -L/u01/app/oracle/product/10.1.0.3/rdbms/lib -o cps_lib_test cps_lib_test.o -lclntsh `cat /u01/app/oracle/product/10.1.0.3/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/product/10.1.0.3/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lmm -lcore10 -lxml10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /u01/app/oracle/product/10.1.0.3/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/product/10.1.0.3/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lcore10 -lxml10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lcore10 -lxml10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /u01/app/oracle/product/10.1.0.3/lib/sysliblist` -R/u01/app/oracle/product/10.1.0.3/lib -laio -lposix4 -lkstat -lm -lthread cps_lib.so
    ld: fatal: file cps_lib_test.o: wrong ELF class: ELFCLASS64
    ld: fatal: File processing errors. No output written to cps_lib_test
    *** Error code 1
    make: Fatal error: Command failed for target `build'
    Can someone please help?

    Check your client installation of oracle whether it is 64bit.
    One of your libraries you are linking is 32 bit instead of 64 bit

  • Is iDAR 5.0 64 bits application?

    Does anybody know if iDAR 5.0 is a 64 bit application or 32 bit one? I would like to get the bits because the file descriptor has different soft ulimit on 64 and 32 bits application.
    Thanks!

    Never mind. I just got the answer it run as 32 bit process even it can run on 64 bit Solaris 8
    Thanks!

  • How to find solution for avoiding WARNING J2EE SECUR-00100 ********** user-manager (see application/server descriptors) will no longer be supported in the next release of this product

    HI All,
    We are using Oc4j version 10g 10.1.3 , and while starting conatiner  getting below warning , let me know if anyone have solution for this,.
    14/01/10 01:01:29 ********** user-manager (see application/server descriptors) will no longer be supported in the next release of this product!
    Please take the appropriate actions to migrate to an alternative strategy! **********
    2014-01-10 01:01:29.833 WARNING J2EE SECUR-00100 ********** user-manager (see application/server descriptors) will no longer be supported in the next release
    of this product!

    I just checked my BIOS and my current setting is set at IDE although it also mentions that the default should be AHCI. Currently I have a dual boot of Windows 7 (need it for Tax software) and Arch
    So I guess, when I get the new HDD, I will first set it to AHCI and then install the OSes on it. See if NCQ helps any, and if not I will turn it back and re-install (if I have to). I am planning to have Windows only in virtualbox in the new drive.
    Anyhoo, while I was in the BIOS I found two things which I had questions about :
    1) Under Onboard Devices --> Integrated NIC , my setting is currently set at "On w/PXE" and it says the default should be just "On". Would it be ok to change it back to On since its a single machine and its not booting an OS on any server. I just don't want to have to re-install anything now since I will be doing that in the new HDD.
    2) How would I know whether my BIOS would support a 64 bit OS in Virtualbox? I checked some setting under Virtualization, but they weren't very clear.
    I will edit this post and let you know exactly what settings were present under the Virtualization sub-section.

  • Running a 32 bits application from a JDK 1.3.1

    Can any one tell me how we can run a 32 bit application from a JDK 1.3.1 on a Solaris and AIX platform

    You mean an executable? See java.lang.Runtime.exec(). (Presumably you have compiled the app for both OSes.)
    If you mean a java application then the 32 bit part doesn't matter.

  • Error in installation of 64 bit 11g client on solaris sparc64 bit

    hi,
    i am getting below error while installing the 11g 64 bit client on solaris sparc 64 bit machine.
    following error is occurred while installing 64 bit oracle 11.2 client on Solaris 64-bit sparcv9 OS:
    Error in invoking target 'mkldflags ntcontab.o nnfgt.o' of makefile
    kindly assist.
    Thanks,
    -Shubhen

    user12052679 wrote:
    hi,
    i am getting below error while installing the 11g 64 bit client on solaris sparc 64 bit machine.
    following error is occurred while installing 64 bit oracle 11.2 client on Solaris 64-bit sparcv9 OS:
    Pl read the Install Guide to ensure you meet all of the pre-installation requirements - http://docs.oracle.com/cd/E11882_01/install.112/e24347/pre_install.htm#CIHFICFD
    Error in invoking target 'mkldflags ntcontab.o nnfgt.o' of makefile
    kindly assist.
    Thanks,
    -ShubhenHTH
    Srini

  • 32-bit Application stops working on Windows 7 Enterprise machine after Windows is restarted

    Hello,
    We have a legacy 32-bit application that we distribute that was built with Microsoft's Visual Basic 6.0.  I have installed this application on many versions of Windows up to and including Windows 8.1 with no issues.
    Recently we provided the application to one of our end users who is running Windows 7 Enterprise on multiple laptops.  They are able to install the application and run it without issues until the machine is restarted.  After the machine is restarted
    the icon for the application changes to the standard Windows EXE icon and when they attempt to start the application they get the Windows message box:  "The version of this application is not compatible with the version of Windows you're running....".
    From the research I have done, this error would only apply to trying to run a 16-bit application or if you are trying to run a 64-bit application on a 32-bit version of Windows, neither of which is the case here.
    It also quite odd that they are able to install and run the application with no issues until Windows is restarted, and this has been verified on multiple of their machines.  The icon change is also quite odd.
    If anyone can provide any information regarding this issue it would be greatly appreciated.
    Thank you.

    Hi,
    Have you checked this page?
    Help with Windows 7 compatibility problems
    The following steps can help you with programs that aren't working properly:
     Step 1: Find software updates from the program manufacturer.            
     Step 2: Try re-installing the program by following the steps in
    Install a program.
     Step 3: Follow the steps in Make older programs run in this version of Windows.
     Step 4: Try running the program using Windows XP Mode. Get more information in
    Install and use Windows XP Mode.
    Best regards
    Michael Shao
    TechNet Community Support

  • How to run D2k 32 bit Application on Windows 7 64 Bit

    Dear Friends
    How to run D2k 32 bit Application on Windows 7 64 Bit, Presently I am having a Application developed in D2k 32 Bit, and it is running smooth on Windows Visa and Windows Xp. but now OUr company are going for new Laptops having Windows 7 64 Bit.
    Is there any way to Solve this Problem, or I have to upgrade D2k , which will be a 6 month job.
    sandy

    Since Forms 6 was never certified on Vista, I will assume you don't care about using Oracle Support. If that's the case, getting Forms 6 to work on Win 7 would likey require similar steps as you took to getting it to work on Vista.
    At minimum, you would need to do the following:
    1. Start with Forms/Reports 6.0.8.11 (6i Release 2)
    2. Install the latest (last) patch (#17), bring the version to 6.0.8.26
    3. It may be necessary to relax or disable Windows UAC
    4. To run the executables, you have to right click on them and select Run As Administrator in order for them to work properly.
    THE ABOVE IS NOT A SUPPORTED CONFIGURATION
    Forms 6.x was desupported years ago. If you have not already begun to do so, you should probably be working on a migration plan in order to get you to a supported version. The latest version is 11.1.1.3, so you are far behind. All versions newer than 6.x are entirely web based. This means that you will no longer be able to use the Forms runtime on the client machines. Client machines will require an Oracle certified browser and JRE in order to run Forms. Certification information for Fusion Middleware 11 (includes Forms 11) can be found here:
    http://www.oracle.com/technetwork/middleware/downloads/fmw-11gr1certmatrix.xls
    FMw Product information can be found here:
    http://www.oracle.com/us/products/middleware/index.html
    Forms 11 information can be found here:
    http://www.oracle.com/us/products/tools/oracle-forms-161771.html
    http://www.oracle.com/technetwork/developer-tools/forms/overview/index.html

  • BUG! Not system locale Filenames support for 32-bit applications error in Windows 8.1 x64 and other microssoft x64 OS-s.

    BUG! Not system locale Filenames support for 32-bit applications error in Windows 8.1 x64.        
    All Windows x64 (XP,2003,2007,Vista,7,8) have no support for not system locale filenames|foldernames for all 32-bit applications. I think it is BUG!
    For example,  it is possible to read files|folders with French or Chinese in English locale windows installed, rename it, but it is not possible open it, edit or delete. (ERRORS: File not found OR Unknown format)
    With using 64-bit programs no such problems. How does it works and how can I fix this? Is it problem with encoding in translating kernel instructions for 32-bit apps in x64 Windows OS's? Whether there are
    solutions to this problem OR some hacks|fixes? 

    Hi,
    Have you installed the language package for French or Chinese?
    If no, please download the language package and install them.
    To download language package, please click the link below,
    http://windows.microsoft.com/en-US/windows/language-packs#lptabs=win7
    Best Regards.
    Steven Lee
    TechNet Community Support

  • Can't download Oracle 8.1.7 Enterprise Edition for Solaris 32 bit??

    I can't download Oracle 8.1.7 Enterprise Edition for Solaris 32 bit. After filling out the form with the questions...I click on the actual link, but the box never pops up. The status bar on my Internet Explorer slowly increases, but never allows me to download. It just hangs. I have tried multiple times, and I can download other verions from your site...and have many times in the past. Could you please fix this. Thanks.

    I've looked at it and it seems fine. It might have been a temporary glitch - let us know if you continue to have trouble.
    OTN

  • Does PE10 install as a 32-bit or 64-bit application on Windows 8 64 bit?

    Premiere Elements 10 was released as a 64 bit application only when on Windows 7 64 bit. For all other operating systems, it was still a 32 bit application running in the 32 bit compatibility mode of a 64 bit system.
    For me, that poses an interesting question about Premiere Elements 10 and how it was set up to recognize one operating system from another. I am still with Premiere Elements 10 on Windows 7 64 bit. So I ask, if I install Premiere Elements 10 on Windows 8 64 bit, will Premiere Elements 10 be a 32 or 64 bit application?
    Has anyone one been there and done that and found the answer?
    Thanks.
    ATR

    tjmx
    This thread was not directed to an Adobe issue, but rather as a fact finding mission regarding the possibiity to install Premere Elements 10 on Windows 8 64 bit. I am still working with Windows 7 64 bit and, unless forced to for some reason, will not be going to Windows 8 64 bit in the near future. Your post #10 of this thread directed to my attention motivated me to check your prior posts to get more information on your Adobe product issue to which you were referring.
    The first one that I found was
    http://forums.adobe.com/message/4807792#4807792
    Keep in mind that I am not affiliated with Adobe nor Sony in any way nor have any insider information on their products. My information is almost entirely based on hands on exploration and experimentation of the product. And, when my information is from something that I have read, I try to make the distinction between hands on and "from what I have read".
    After reading your thread cited above, it would appear that the issue does not go to Adobe, but rather to Sony and its pre-installed Premiere Elements products. Premiere Elements 10 Windows should be compatible with Windows 8 64 bit, provided you have the proper installation tool given to you. Clearly, Sony does not design to that end for its pre-install Premiere Elements. From what I have read, you should run into problems even in the same operating system if you uninstalled the pre-installed Premiere Elements 10 since Sony is not going to supply you with installation files nor discs for this. Am I correct in this?
    The spin of the message from Sony (shown in your prior thread referenced above) would suggest that you are dealing with a Premiere Elements 10/computer operating system compatibility issue. As I just mentioned in the previous paragraph of this post, you should be running into problems even in the same operating system if you uninstalled the pre-installed Premiere Elements 10 and then wanted to reinstall it.
    Have you read the fine print in the Sony Vaio purchase with regard to pre-installed Premiere Elements 10? If not, see if you can find anything in it that defines your rights as to obtaining installation means for the pre-installed that has to be uninstalled and then reinstalled for whatever reason, troubleshooting or upgrading of the operating system. This is an old story of Sony Vaio and pre-installed Premiere Elements.
    ATR

  • I want to install my photoshop 5.0 limited edition but the pc displays i should check if it is a 32 or 64 bit application. i changed my windows os  from xp to win7 64 bit (i think that is the problem) how can i run my photoshop on this system?

    i want to install my photoshop 5.0 limited edition but the pc displays i should check if it is a 32 or 64 bit application. i changed my windows os  from xp to win7 64 bit (i think that is the problem) how can i install and run my photoshop 5.0 le on this system?

    Kglad Creative Suite 2 is only applicable to individuals affected by the activation server shut down.  A complete list of affected software titles can be found at Activation server shut down for Creative Suite 2, Acrobat 7, and Macromedia products.

Maybe you are looking for

  • Wifi connectivity issue after IOS8 upgrade

    I am using Iphone 5s and  I updated my phone to IOS 8 using a wifi, went through successfully but after the update, i am unable to connect to the same wifi i used to update my phone, i never had a problem connecting to it before, the wifi is not secu

  • About Dreamweaver CC. Problem with files in local site

    I have problems to add new pictures or new files in my site with dreamweaver CC. In my folder, in my computer, I can see my new picture, but not in dreamweaver in the local site, it only see locked files. I can't add new picture files, only html page

  • My time machine keeps interrupting and gives this message:Volumes/Data/user's iMac.sparsebundle" is already in use.

    Need help with Time Machine.  It will not complete. I am using AirPort as the backup for Time Machine. "Time Machine couln't complet the backup to "K Time Capsule" The backup disk image "/Volumes/Data/user'siMac.sparsebundle" is already in use." Is t

  • Captivate 3 shuts down when opening Cap 2 projects

    Hi there, Hoping someone can help with this. I am amending captivate 2 proejcts on Captivate 3. Sometimes when I go to open the projects in Cap 3, I get the usual screen, overwrite or re-name etc, but which ever option I choose Captivate then shuts d

  • Is Safari Bad?

    Why does my Safari crash frequently? Is it because the phone can't hand more than 2 tabs or is it just buggy?