Re: Storage Manager crash at mdwrite()

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Tareq Aljabban <dee(dot)jay23(dot)me(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Storage Manager crash at mdwrite()
Date: 2012-03-15 23:58:03
Message-ID: 1331855883.14701.16.camel@sussancws0025
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2012-03-15 at 19:36 -0400, Tareq Aljabban wrote:
> When configuring postgreSQL, I'm adding the libraries needed to run
> HDFS C API (libhdfs).
>

>From the information below, it looks like C++.

>
> ./configure --prefix=/diskless/myUser/Workspace/EclipseWS1/pgsql
> --enable-depend --enable-cassert --enable-debug CFLAGS="$CFLAGS
> -I/diskless/myUser/Workspace/HDFS_Append/hdfs/src/c++/libhdfs
> -I/usr/lib/jvm/default-java/include" LDFLAGS="$LDFLAGS
> -L/diskless/myUser/Workspace/HDFS_Append/hdfs/src/c++/libhdfs
> -L/diskless/myUser/Workspace/HDFS_Append/build/c++/Linux-i386-32/lib
> -L/usr/lib/jvm/default-java/jre/lib/i386/server -ljvm -lhdfs"
>
>
>
>
>
> I have done lots of changes so far on how the storage manager works.
> In fact, I changed smgr.c so instead of calling regular md.c
> functions, that it would call my functions .
> For simplicity, you can say that whenever mdwrite() was supposed to be
> called, another function is also called beside it. so now what is
> being called is:
> mdwrite(param1, param2, buffer, ....);
> hdfswrite(param1, param2, buffer, ....);
>
>
> where hdfswrite() is the function where I write the buffer to HDFS.
> I changed hdfswrite() so it will always write only the same (dummy)
> buffer down to HDFS storage. Let's say "dummyBufferFile". After
> writing this file 3 times to HDFS, I'm getting the message that I've
> shown in my first email.
> The same hdfswrite() code works without any issues when I run it in a
> separate application.
>
>
> Hope it's clear now.

Well, it's clear that there's a lot going on ;)

In other words, is there a reason you think that these would all work
together nicely?

I don't know the specifics, but I understand there are numerous perils
to linking complex C++ code into complex C code, particularly around
exception handling. Look in the archives for previous discussions around
C++.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-03-16 00:37:36 Re: foreign key locks, 2nd attempt
Previous Message Tareq Aljabban 2012-03-15 23:36:23 Re: Storage Manager crash at mdwrite()