Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> HP 11.0 and Oracle 7.3.4!

HP 11.0 and Oracle 7.3.4!

From: Kiran K. Ganji <kganji_at_grover.eecs.uic.edu>
Date: Fri, 30 Jul 1999 11:30:33 -0500
Message-ID: <Pine.GSO.3.96.990730111548.7510A-200000@grover.eecs.uic.edu>


Hi

I am writing some application that uses pthreads (I tried with and without using threads.h++ from RogueWave) needing Oracle 7.3.4 on HPUX 11.

During the link part, I obviously need to use -lpthread and Oracle documentation indicates I need to use -l:libcma.sl. The application links fine but results in SIGBUS even before the program starts. I tried running thru dde but the loading of the executable itself results in SIGBUS. To simplify the problem I wrote a small pthread example that DOES NOT need Oracle, link it using -lpthread, it runs fine. Link it explicitly to Oracle 7.3.4 libraries without -l:libcma.sl, also perfectly fine.

Link it to Oracle 7.3.4 libraries with -l:libcma.sl, the SIGBUS reappears.

Any idea as to why this is happening and how I can acheive my objective ?

Thanks in advance.

Regards,
Kiran

PS: The C++ source file is attached


#include <stdio.h>
#include <time.h>
#include <pthread.h>

void foo(void* arg)
{
  fprintf(stderr, "This is foo\n");   

  for (int i = 0; i < 100000000; i++)
    if (!(i % 1000000))
    fprintf(stderr, "thread = %d, i = %d\n", int(arg), i);

  fprintf(stderr, "foo over for thread = %d\n", int(arg)); }

int main()
{

  FILE *fp = fopen("/login/kganji/rwExample/mttest", "a");

  fprintf(stderr, "This is main\n");
  pthread_t thr[8];

  long t1 = time(NULL);
  fprintf(stderr, "Time in the beginning is %d\n", t1);

  int i;
  for (i = 0; i < 8; i++)
    pthread_create(&(thr[i]), NULL, (void *(*)(void *))foo, (void *)i);

  fprintf(stderr, "Created all the threads\n");   for (i = 0; i < 8; i++)
    pthread_join(thr[i], NULL);

  long t2 = time(NULL);
  fprintf(stderr, "Time in the end is %d and diff = %d\n", t2, t2 - t1);

  fprintf(stderr, "main over\n");

  return 0;
} Received on Fri Jul 30 1999 - 11:30:33 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US