Multithreading in Pro*C


 
Thread Tools Search this Thread
Top Forums Programming Multithreading in Pro*C
Prev   Next
# 1  
Old 09-09-2001
Question Multithreading in Pro*C

Smilie

Hi!

I have created a Multhreaded Application in Pro*C (using pthreads) with about 5 Threads running simultaneously. The Application is basically to Update a Centralized Table in Oracle, which updates different rows in the Table (Each Thread updates different rows!). The problem is that it gets compiled and when I execute, I get an error.

This happens like this ...

void *thread_1(void *nothing)
{
EXEC SQL BEGIN DECLARE SECTION;
.
.
.
EXEC SQL END DECLARE SECTION;

EXEC SQL CONTEXT USE :ctx0;
EXEC SQL WHENEVER SQLERROR DO sql_error();
printf(" In Here\n");
EXEC SQL CONNECT : uid IDENTIFIED BY : pwd;
printf(" Out Here\n");


.
.
.
}


The "In Here" is displayed on the Screen, but "Out Here" message is never shown on screen, but instead, I get the message:


In Here
Stack overflow: pid 17041, proc UPDATE, addr 0x140065ff0, pc 0x1200b961c
Memory fault(coredump)


The UID/PWD is right. But when I reduse some "EXEC SQL ..." statements from the function, the program works perfecty fine!

Could someone tell me what exactly is the error and how can it be avoided.

Thanks and Regards
SHAIK

Last edited by shaik786; 09-09-2001 at 08:25 AM..
shaik786
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

Help with multithreading

I take this question of the The Linux Programming Interface: A Linux and Unix System Programming page 652 exercise 30.1 I want someone to explain the under line statement because it sounds complex to me couldn't understand anything 30-1 Modify the program (thread_incr.c) so that each loop in... (3 Replies)
Discussion started by: fwrlfo
3 Replies

2. Programming

how to do udp broadcast with multithreading

hello to all i want to use multithreading to my UDP broadcast server client program. will anyone help me by proving C code. i am working in fedora. also my requirement is POSIX compliance.please help me..... (6 Replies)
Discussion started by: moti12
6 Replies

3. IP Networking

how to do udp broadcast with multithreading

hello to all i want to use multithreading to my UDP broadcast server client program. will anyone help me by proving C code. i am working in fedora. also my requirement is POSIX compliance.please help me..... (0 Replies)
Discussion started by: moti12
0 Replies

4. Programming

MultiThreading using Pthreads

Situation: i have multiple pthread_create calls like this: pthread_create(...., ThreadFunc1,.....); pthread_create(...., ThreadFunc2,.....); . . which i am using to create multiple threads.All the "ThreadFunc<i>" functions are actually calling same function "Receive" of a class using same... (3 Replies)
Discussion started by: Sastra
3 Replies

5. Shell Programming and Scripting

Multithreading program

Hi I need to insert 1million records into MySQL database, but it is taking lot of time as there is no bulk insert support. I want to spawn 10 processes which will insert 100k records each parallely. Can somebody help me with a example program to execute this task through shell scripting. (5 Replies)
Discussion started by: sach_roger
5 Replies

6. UNIX for Advanced & Expert Users

multithreading in UNIX

Hi, Can you please give me a suitable reference to learn multithreading programming in C in UNIX? Thanks (3 Replies)
Discussion started by: naan
3 Replies

7. UNIX for Dummies Questions & Answers

How to write Pro*C daemon process using multithreading?

Hello, I am new to this forum and this is my first post here... I have never worked on either Pro*C or Multithreading..Now, i have to write a Pro*C, Multithreading daemon process.. I dont know where to start.. Can anybody help me with examples? 1. need to write a Pro*C multithreading... (0 Replies)
Discussion started by: kachiraju
0 Replies

8. Programming

multithreading on OSX

Hi all, I have a query about multithreading. What I would like to do is, at the start of my main update() function, start a couple of threads in parallel, once they are all complete carry on with my main update function. void update() { thread1->update(); // fluid solver ... (3 Replies)
Discussion started by: memoid
3 Replies

9. UNIX for Dummies Questions & Answers

domain logon problem - FreeBSD PDC w/ win2k pro and winxp pro

this is the seventh problem i'm having with samba. for some reason, i cannot logon to the domain. i've created user accounts... and i was able to establish a connection between the samba server (my PDC) and my workstations by logging in as "root." however now when i try to logon it gives... (5 Replies)
Discussion started by: xyyz
5 Replies
Login or Register to Ask a Question
CRASH(L)																  CRASH(L)

NAME
crash - analyze kernel dump or active system image SYNOPSIS
crash [ aps ] [ -bdvtiz ] [ -s sfile ] [ -c cfile ] [ -u addr ] DESCRIPTION
Synopsis of options - -b Brief mode; skip general display of processes -d Crash dump contains swap image. (default?) -v Verbose; dump much information about each proc [future] -t TTY structs to be dumpped -i Incore inode table to be printed -c FILE Provide non-standard file name for system image input -s FILE Provide non-standard symboltable input -u ADDR Trace a process other than currently selected one -z Interrupt Trace displayed aps Print PS & PC at time of interupt (doesn't do anything) crash examines a dump of unix which it looks for in the file sysdump. It prints out the contents of the general registers, the kernel stack and a traceback through the kernel stack. If an aps is specified, the ps and pc at time of interrupt are also printed out. The dump of the stack commences from a "reasonable" address and all addresses are relocated to virtual addresses by using the value of kdsa6 found in the dump. The following options may be specified. -b Brief mode; skip general display of processes. Only the currently selected process will be traced. -c cfile If the -c argument is found, the following argument is taken to be the name of a file containing the system image. The default is "/usr/sys/core". -s sfile If the -s argument is found the following argument is taken to be the name of a file, containing a symbol table which should be used in interpreting text addresses. The default is "/unix". -u addr Force a process to be displayed as if it were active when the crash occurred. addr is the octal address of the proc table entry. FILES
/unix system namelist /dev/swap swap device /usr/sys/core core file SEE ALSO
crash(8), adb(1), ps(1), rstat(1) DIAGNOSTICS
Missing arg Unable to Open file Format Error in symbolfile BUGS
Care should be used in running crash on "/dev/mem". Things can change while crash is running; the picture it gives is only a close approx- imation to reality. AUTHOR
Mike Muuss, JHU EE John Stewart, Teledyne Geotech March 1983 CRASH(L)