[Firebird-devel] [FB-Tracker] Created: (CORE-5851) Incomplete fix for CORE-5779 - missing builds/posix/prefix.linux_riscv64

2018-06-20 Thread Damyan Ivanov (JIRA)
Incomplete fix for CORE-5779 - missing builds/posix/prefix.linux_riscv64


 Key: CORE-5851
 URL: http://tracker.firebirdsql.org/browse/CORE-5851
 Project: Firebird Core
  Issue Type: Bug
  Components: Build Issues / Porting
Affects Versions: 4.0 Beta 1
Reporter: Damyan Ivanov


The fix for CORE-5779 (1e8e7858db84750a77006d307bf28e9686f9414e) missed the 
build prefix file.

Here's one by a Debian porter.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5723) It is possible to store more digits than de declared precision in DECIMAL(X, Y)

2018-01-24 Thread Damyan Ivanov (JIRA)
It is possible to store more digits than de declared precision in DECIMAL(X,Y)
--

 Key: CORE-5723
 URL: http://tracker.firebirdsql.org/browse/CORE-5723
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0.2
 Environment: Debian/unstable 64-bit, SQL dialect 3
Reporter: Damyan Ivanov
Priority: Minor


SQL> create table test(a decimal(18,18), b decimal(3,3));
SQL> insert into test(a,b) values('9.123456789012345678', '99.999');
SQL> set list;
SQL> select * from test;

A   9.123456789012345678
B   99.999



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5694) Duplicate values in columns with a unique constraint

2018-01-04 Thread Damyan Ivanov (JIRA)
Duplicate values in columns with a unique constraint


 Key: CORE-5694
 URL: http://tracker.firebirdsql.org/browse/CORE-5694
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0.2
 Environment: Debian/unstable on amd64, firebird3.0 package version 
3.0.2.32703.ds4-12
SuperServer, SuperClassic and Classic, forced writes ON and OFF, sweep disabled 
or 2
Reporter: Damyan Ivanov
 Attachments: fb-dupl-uniq.fbk.gz

It is possible to get rows with duplicate values in columns with a unique 
constraint.

Sample database backup is in fb-dupl-uniq.fbk.gz

Notice the unique constraint on test(obj_id, prj_id) and the procedure 
add_obj_to_prj which inserts records in TEST ignoring constraint violation. 
That procedure is invoked by an after update/insert trigger of table OBJ.

To trigger the problem, run the following shell command:

(triggers updates in 5000 rows, in random order, in 6 parallel processes)

for j in $(seq 1 6); do ( ( for i in $(seq 1 5000); do echo $i; done | shuf | 
while read i; do printf "update obj set data='Object %d' where id='911%07d';\n 
commit;\n" $i $i; done ) | isql-fb 
localhost:/var/lib/firebird/3.0/data/test.fdb ) &; done

there may be some update conflicts, but that's irrelevant -- I see the problem 
even when there are no update conflicts.

The above may need to be run several times, or the process count to be 
increased to surpass the number of CPU cores.

Execute the following SQL to see if the problem is there:

select obj_id, prj_id, count(*) from test
group by 1,2
having count(*) > 1;

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [patch] parent guardian process exits before fbserver is accepting connections

2017-04-04 Thread Damyan Ivanov
Hi,

Attached is a patch that makes the parent guardian process exit to the 
OS only after fbserver has called listen() initializing its network 
socket.

Without it, the following loop fails (sooner or later):

while true; do sudo service firebird3.0 restart; echo "select 'ready' from 
rdb\$database;" | isql localhost:employee; sleep 2.1; done

(the sleep is there to avoid the systemd limitation of 5 service 
restarts per 10 seconds).

The patch makes the fbserver process send a SIGUSR1 signal to the 
parent guardian process, which waits for it before exiting to the OS.

The patch applies (with a bit of fuzz) to master, B3_0_Release and 
B2_5_Release branches.

I hope you find it useful. I'll be including the patch in the next 
Debian release, after Debian 9 "stretch" is released later this year.

Please tell me if you prefer a ticket in JIRA or pull requests on 
github.


Cheers,
dam
--- a/src/remote/inet.cpp
+++ b/src/remote/inet.cpp
@@ -1012,6 +1012,12 @@ static rem_port* listener_socket(rem_por
 
 	inet_ports->registerPort(port);
 
+	char *parent_pid;
+	if (parent_pid = getenv("FB_SIGNAL_PROCESS"))
+	{
+		kill(atoi(parent_pid), SIGUSR1);
+	}
+
 	if (flag & SRVR_multi_client)
 	{
 		// Prevent the generation of dummy keepalive packets on the connect port.
--- a/src/utilities/guard/guard.cpp
+++ b/src/utilities/guard/guard.cpp
@@ -162,13 +162,32 @@ int CLIB_ROUTINE main( int argc, char **
 		exit(-5);
 	}
 
+	sigset_t ss, save_sig_mask;
+	sigemptyset(&ss);
+	sigaddset(&ss, SIGUSR1);
+	sigprocmask(SIG_BLOCK, &ss, &save_sig_mask);
+
 	// detach from controlling tty
 	if (daemon && fork()) {
+		int sig;
+
+		struct timespec ts = { .tv_sec=15, .tv_nsec= 0 };
+		do {
+			sig = sigtimedwait( &ss, NULL, &ts );
+		} while ( sig == EINTR );
+
+		if ( sig != SIGUSR1 ) {
+			fprintf( stderr, "Time out waiting for fbserver process start\n");
+			exit(-4);
+		}
+
 		exit(0);
 	}
+	sigprocmask(SIG_SETMASK, &save_sig_mask, NULL);
 	divorce_terminal(0);
 
 	time_t timer = 0;
+	bool first_start = true;
 
 	do {
 		int ret_code;
@@ -187,6 +206,18 @@ int CLIB_ROUTINE main( int argc, char **
 		}
 		timer = time(0);
 
+		if (first_start)
+		{
+			char pid[10];
+			snprintf(pid, sizeof(pid), "%d", getppid());
+			setenv("FB_SIGNAL_PROCESS", pid, 1);
+			first_start = false;
+		}
+		else
+		{
+			unsetenv("FB_SIGNAL_PROCESS");
+		}
+
 		pid_t child_pid =
 			UTIL_start_process(SERVER_BINARY, server_args, prog_name);
 		if (child_pid == -1)
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] rare segfault in fb_shutdown()

2017-01-15 Thread Damyan Ivanov
-=| Alex Peshkoff, 13.01.2017 14:32:09 +0300 |=-
> On 01/03/17 00:38, Damyan Ivanov wrote:
> > I've been chasing this for some time, and finally I've come (with help
> > from others) to a environment which makes the segfault relatively easy
> > to reproduce, although it still requires patience.
> >
> 
> > I browsed the commits in the B3_0_Release branch, but none seemed to touch 
> > any
> > code that seems relevant to me.
> 
> Not strange that you've missed that commit - races when thread is 
> closing are present since interbase times, but presence of provider 
> architecture in FB3 made them more often visible.
> 
> Should be fixed, see http://tracker.firebirdsql.org/browse/CORE-5452

Thank you, Alex.

I have added the patch to the Debian package and the specially-crafted 
single-core environment seems to no longer expose the crash.


Cheers,
dam

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] rare segfault in fb_shutdown()

2017-01-02 Thread Damyan Ivanov
Hi,

I've been chasing this for some time, and finally I've come (with help 
from others) to a environment which makes the segfault relatively easy 
to reproduce, although it still requires patience.

Everything happens on a POSIX (Debian testing or unstable) system. On a fast
(3GHz) single-threaded single-core virtual machine (qemu-kvm). This is the
important part, slow CPU or multi-core environments makes the segfault go away.

This is a freshly built firebird 3.0.1.32609 using
CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security
CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2
CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security
LDFLAGS=-Wl,-z,relro -Wl,-z,now

Below is a backtrace from the following command:

 echo "show tables;" | $ISQL $FB_IMG/examples/empbuild/employee.fdb

I had t run it in a loop for about 2 minutes time before the problem showed
itself.

FB_IMG=gen/Release/firebird
ISQL="$FB_IMG/bin/isql -user SYSDBA"

and the following variables are exported in the environment:

 FIREBIRD=gen/Release/firebird
 LD_LIBRARY_PATH=gen/Release/firebird/lib
 FIREBIRD_MSG=gen/Release/firebird

A core file may be downloaded from https://people.debian.org/~dmn/fb-core.xz
(124KB)

I browsed the commits in the B3_0_Release branch, but none seemed to touch any
code that seems relevant to me.

Any help is appreciated. This got reported twice in the Debian bug-tracker,
once for the firebird3.0 package (https://bugs.debian.org/846392) and in
libdbd-firebird-perl (firebird driver for Perl -
https://bugs.debian.org/847288)

Thank you,
Damyan

Thread 3 (Thread 0x7f0bca6f3500 (LWP 15517)):
#0  0x7f0bc8923b77 in sched_yield () at 
../sysdeps/unix/syscall-template.S:84
#1  0x7f0bca23453a in Thread::yield () at ./src/common/ThreadStart.cpp:244
#2  0x7f0bca19e115 in Why::Dispatcher::shutdown 
(this=this@entry=0x7f0bca6e3ee0, userStatus=userStatus@entry=0x7ffc95def0e0, 
timeout=timeout@entry=5000, reason=reason@entry=-7) at 
./src/yvalve/why.cpp:5923
#3  0x7f0bca19ed05 in fb_shutdown (timeout=timeout@entry=5000, 
reason=reason@entry=-7) at ./src/yvalve/why.cpp:3725
#4  0x7f0bca1ca268 in Firebird::PluginManager::unregisterModule 
(this=, cleanup=0x7f0bc5d58578)
at ./src/yvalve/PluginManager.cpp:1060
#5  0x7f0bca1d1749 in 
Firebird::IPluginManagerBaseImpl > 
>::cloopunregisterModuleDispatcher (
self=, cleanup=) at 
./src/include/firebird/IdlFbInterfaces.h:6450
#6  0x7f0bc5dbaacb in Firebird::IPluginManager::unregisterModule 
(cleanup=0x7f0bc5d58578, this=)
at ./src/include/firebird/IdlFbInterfaces.h:804
#7  Firebird::UnloadDetectorHelper::~UnloadDetectorHelper (this=0x7f0bc5d58570, 
__in_chrg=)
at ./src/include/../common/classes/ImplementHelper.h:295
#8  Firebird::UnloadDetectorHelper::~UnloadDetectorHelper (this=0x7f0bc5d58570, 
__in_chrg=)
at ./src/include/../common/classes/ImplementHelper.h:298
#9  Firebird::GlobalPtr::dtor (
this=0x7f0bc5feaf18 <(anonymous namespace)::myModule>) at 
./src/include/../common/classes/init.h:124
#10 
Firebird::InstanceControl::InstanceLink, 
(Firebird::InstanceControl::DtorPriority)1>::dtor (this=0x7f0bc5d585a8) at 
./src/include/../common/classes/init.h:98
#11 0x7f0bc5dba4bc in Firebird::InstanceControl::InstanceList::destructors 
() at ./src/common/classes/init.cpp:231
#12 0x7f0bc5dba566 in Firebird::InstanceControl::destructors () at 
./src/common/classes/init.cpp:212
#13 0x7f0bc5dba6cc in (anonymous namespace)::allClean () at 
./src/common/classes/init.cpp:87
#14 (anonymous namespace)::Cleanup::~Cleanup (this=, 
__in_chrg=) at ./src/common/classes/init.cpp:118
#15 0x7f0bc8887920 in __run_exit_handlers (status=0, listp=0x7f0bc8bea5d8 
<__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, 
run_dtors=run_dtors@entry=true) at exit.c:83
#16 0x7f0bc888797a in __GI_exit (status=) at exit.c:105
#17 0x7f0bc88722b8 in __libc_start_main (main=0x55ecc06124f0 , argc=4, argv=0x7ffc95def488, init=, 
fini=, rtld_fini=, stack_end=0x7ffc95def478) 
at ../csu/libc-start.c:325
#18 0x55ecc061289a in _start ()

Thread 2 (Thread 0x7f0bc8433700 (LWP 15518)):
#0  0x7f0bc8bff577 in futex_abstimed_wait_cancelable (private=0, 
abstime=0x0, expected=0, futex_word=0x7f0bca6e12d0)
at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x7f0bca6e12d0, abstime=0x0) at 
sem_waitcommon.c:111
#2  0x7f0bc8bff624 in __new_sem_wait_slow (sem=0x7f0bca6e12d0, abstime=0x0) 
at sem_waitcommon.c:181
#3  0x7f0bc8bff6b9 in __new_sem_wait (sem=sem@entry=0x7f0bca6e12d0) at 
sem_wait.c:29
#4  0x7f0bca259132 in Firebird::SignalSafeSemaphore::enter 
(this=0x7f0bca6e12d0) at ./src/common/classes/semaphore.cpp:163
#5  0x7f0bca19f01d in (anonymous namespace)::shutdownThread () at 
./src/yvalve/why.cpp:810
#6  0x7f0bca23459e in (anonymous namespace)::ThreadArgs::run 
(this=) at ./src/common/ThreadStart.cpp:78
#7  (anonymous namespace)::threadStart 

[Firebird-devel] [FB-Tracker] Created: (CORE-5265) fb_config --embedlibs returns "-lfbembed", but there is no libfbembed.so anymore

2016-06-07 Thread Damyan Ivanov (JIRA)
fb_config --embedlibs returns "-lfbembed", but there is no libfbembed.so anymore


 Key: CORE-5265
 URL: http://tracker.firebirdsql.org/browse/CORE-5265
 Project: Firebird Core
  Issue Type: Bug
  Components: Scripts
Affects Versions: 3.0.0, 4.0 Initial, 3.0.1
 Environment: posix
Reporter: Damyan Ivanov
Priority: Minor


fb_config --embedlibs returns "-lfbembed", which is useless, since there is no 
libfbembed.so in 3.0.

As I understand it, it should behave the same as fb_config --libs and give 
"-lfbclient".

The current behaviour breaks LibreOffice.org attempts to use firebird3.0. See 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826591

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [patch] spelling fixes for isc_sync.cpp and messages (perfrom -> perform)

2016-03-14 Thread Damyan Ivanov
Attached is a patch fixing a couple of spelling mistakes. It is all 
about "perfrom" typo.

 common/isc_sync.cpp   |2 +-
 include/gen/msgs.h|2 +-
 msgs/history2.sql |2 +-
 msgs/messages2.sql|2 +-
 msgs/transmsgs.de_DE2.sql |2 +-
 msgs/transmsgs.fr_FR2.sql |2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

Description: spelling error (perfrom -> perform)
Author: Damyan Ivanov 

--- a/src/common/isc_sync.cpp
+++ b/src/common/isc_sync.cpp
@@ -1516,7 +1516,7 @@ ULONG ISC_exception_post(ULONG sig_num,
 	case SIGILL:
 
 		sprintf(log_msg, "%s Illegal Instruction.\n"
-"\t\tThe code attempted to perfrom an\n"
+"\t\tThe code attempted to perform an\n"
 "\t\tillegal operation."
 "\tThis exception will cause the Firebird server\n"
 "\tto terminate abnormally.", err_msg);
--- a/src/include/gen/msgs.h
+++ b/src/include/gen/msgs.h
@@ -484,7 +484,7 @@ static const struct {
 	{335544780, "An exception occurred that does not have a description.  Exception number @1."},		/* exception_unknown */
 	{335544781, "Stack overflow.  The resource requirements of the runtime stack have exceeded the memory available to it."},		/* exception_stack_overflow */
 	{335544782, "Segmentation Fault. The code attempted to access memory without privileges."},		/* exception_sigsegv */
-	{335544783, "Illegal Instruction. The Code attempted to perfrom an illegal operation."},		/* exception_sigill */
+	{335544783, "Illegal Instruction. The Code attempted to perform an illegal operation."},		/* exception_sigill */
 	{335544784, "Bus Error. The Code caused a system bus error."},		/* exception_sigbus */
 	{335544785, "Floating Point Error. The Code caused an Arithmetic Exception or a floating point exception."},		/* exception_sigfpe */
 	{335544786, "Cannot delete rows from external files."},		/* ext_file_delete */
--- a/src/msgs/history2.sql
+++ b/src/msgs/history2.sql
@@ -895,7 +895,7 @@ message to appear.', 'Your program encou
 (909, 'SYSDBA', '1998-09-29 12:47:50', 0, 453, 'Floating-point inexact result.  The result of a floating-point operation cannot be represented exactly as a decimal fr', NULL, NULL, 'c_pg');
 (910, 'SYSDBA', '1998-09-29 12:48:33', 0, 459, 'Interger overflow.  The result of an integer operation caused the most significant bit of the result to carry.', NULL, NULL, 'c_pg');
 (911, 'SYSDBA', '1998-09-29 12:49:25', 0, 462, 'Segmentation Fault: code attempted to access memory without privileges.', NULL, NULL, 'c_pg');
-(912, 'SYSDBA', '1998-09-29 12:50:13', 0, 463, 'Illegal Instruction: code attempted to perfrom an illegal operation', NULL, NULL, 'c_pg');
+(912, 'SYSDBA', '1998-09-29 12:50:13', 0, 463, 'Illegal Instruction: code attempted to perform an illegal operation', NULL, NULL, 'c_pg');
 (913, 'SYSDBA', '1998-09-29 12:50:32', 0, 464, 'Bus Error: code caused a system bus error', NULL, NULL, 'c_pg');
 (914, 'SYSDBA', '1998-09-29 12:51:01', 0, 465, 'Floating Point Error: Code caused an Arithmetic Exception or a floating point exception', NULL, NULL, 'c_pg');
 (915, 'duquette', '1998-10-15 17:17:38', 18, 15, 'gsec - unable to open database', NULL, NULL, 'c_pg');
--- a/src/msgs/messages2.sql
+++ b/src/msgs/messages2.sql
@@ -559,7 +559,7 @@ without specifying a character set.', NU
 ('exception_unknown', 'POST_EXCEPTIONS and POST_EXTRENA', 'common.h', 'obsolete', 0, 460, NULL, 'An exception occurred that does not have a description.  Exception number @1.', NULL, NULL);
 ('exception_stack_overflow', 'POST_EXCEPTION', 'common.h', NULL, 0, 461, NULL, 'Stack overflow.  The resource requirements of the runtime stack have exceeded the memory available to it.', NULL, NULL);
 ('exception_sigsegv', 'ISC_exception_post', 'isc_sync.c', NULL, 0, 462, NULL, 'Segmentation Fault. The code attempted to access memory without privileges.', NULL, NULL);
-('exception_sigill', 'ISC_exception_post', 'isc_sync.c', NULL, 0, 463, NULL, 'Illegal Instruction. The Code attempted to perfrom an illegal operation.', NULL, NULL);
+('exception_sigill', 'ISC_exception_post', 'isc_sync.c', NULL, 0, 463, NULL, 'Illegal Instruction. The Code attempted to perform an illegal operation.', NULL, NULL);
 ('exception_sigbus', 'ISC_exception_post', 'isc_sync.c', NULL, 0, 464, NUL

Re: [Firebird-devel] [patch] spelling fixes for isc_sync.cpp and messages (perfrom -> perform)

2016-03-14 Thread Damyan Ivanov
-=| Damyan Ivanov, 14.03.2016 15:46:22 + |=-
> Attached is a patch fixing a couple of spelling mistakes. It is all 
> about "perfrom" typo.

Forgot to mention that the patch was made against Firebird 3.0.0.32383 
from the B3_0_Release branch in subversion.

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Firebird 3 packages on distro

2016-02-25 Thread Damyan Ivanov
-=| Philippe Makowski, 25.02.2016 10:33:46 +0100 |=-
> I'm working on the Firebird 3 package for Centos 7
> 
> to have some coherence between distros , I took a look at :
> https://build.opensuse.org/package/show/home:mkubecek:firebird30/firebird
> 
> and
> 
> https://anonscm.debian.org/cgit/pkg-firebird/3.0.git/
> 
> Can we coordinate our work ?
> 
> I like the way Debian split the package, Michal, what about doing the 
> same in Suse ? (I will certainly do the same in Mageia, Fedora and Centos)
> 
> About your patches Damian, why some are in out/ ?

Patches in out/ are meant to be forwarded to firebird upstream. 
I haven't done that yet, sorry.

The purpose of each patch is described within.

deb/* are meant to be Debian-specific, but I guess deb/gen-ids.patch 
may be integrated upstream.

Of the rest, most seem suitable for upstream inclusion, except:

 * deb/march-i486.patch: lower CPU optimization to -march=i486
 * deb/no-suse.init.patch: remove mention of a file not present in
   sources shipped in Debian
 * no-binary-gbaks.patch: drop mention of help.gbk and qli. the former 
   is not present in Debian sources, and qli needs it
 * no-binary-metadata.gbak.patch: already included upstream \o/
 * packaged-boost.patch: perhaps should be rewritten to use 
   a configure option instead of requiring a system-wide boost to be 
   available


-- dam

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Failure to build with GCC 6: cannot convert x to y

2016-01-22 Thread Damyan Ivanov
-=| marius adrian popa, 20.01.2016 10:55:59 +0200 |=-
> Firebird 2.5.x package fails to build with gcc 6
> 
> http://lists.alioth.debian.org/pipermail/pkg-firebird-general/2016q1/002716.html

The fix in r62830 
http://sourceforge.net/p/firebird/code/62830/tree//firebird/branches/B2_5_Release/src/gpre/sqe.cpp?diff=50cc621834309d0a4876d914:62829

is not enough. Later on there are these errors:

g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DBOOT_BUILD -I../src/include/gen 
-I../src/include -I../src/vulcan -DNAMESPACE=Vulcan -DNDEBUG -ggdb 
-DFB_SEND_FLAGS=M
SG_NOSIGNAL -DLINUX -DAMD64 -pipe -MMD -fPIC -fmessage-length=0 -O3 
-fno-omit-frame-pointer  -pthread -g -O2 -fstack-protector-strong -Wformat 
-Werror=for
mat-security -fno-rtti  -c ../src/common/classes/alloc.cpp -o 
../temp/boot/common/classes/alloc.o
../src/common/classes/alloc.cpp: In function 'void* operator new(size_t)':
../src/common/classes/alloc.cpp:2107:7: error: declaration of 'void* operator 
new(size_t) throw (std::bad_alloc)' has a different exception specifier
 void* operator new(size_t s) THROW_BAD_ALLOC
   ^~~~

In file included from ../src/common/classes/alloc.cpp:32:0:
../src/include/../common/classes/alloc.h:495:7: note: from previous declaration 
'void* operator new(std::size_t)'
 void* operator new(size_t s) THROW_BAD_ALLOC;
   ^~~~

../src/common/classes/alloc.cpp: In function 'void* operator new [](size_t)':
../src/common/classes/alloc.cpp:2111:7: error: declaration of 'void* operator 
new [](size_t) throw (std::bad_alloc)' has a different exception specifier
 void* operator new[](size_t s) THROW_BAD_ALLOC
   ^~~~

In file included from ../src/common/classes/alloc.cpp:32:0:
../src/include/../common/classes/alloc.h:496:7: note: from previous declaration 
'void* operator new [](std::size_t)'
 void* operator new[](size_t s) THROW_BAD_ALLOC;
   ^~~~

../gen/make.rules:112: recipe for target '../temp/boot/common/classes/alloc.o' 
failed


$ g++ -v
Using built-in specs.
COLLECT_GCC=/usr/bin/g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 6-20160117-1' 
--with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs 
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-6 --enable-shared --enable-linker-build-id 
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix 
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-libstdcxx-time=yes 
--with-default-libstdcxx-abi=new --enable-gnu-unique-object 
--disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib 
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo 
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home 
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64 
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64 
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar 
--enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=
 m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic 
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu 
--target=x86_64-linux-gnu
Thread model: posix
gcc version 6.0.0 20160117 (experimental) [trunk revision 232481] (Debian 
6-20160117-1) 


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [patch] USE_QSORT_CTX on Debian/kFreeBSD

2015-06-05 Thread Damyan Ivanov
Hi,

Attached is a patch that fixes failure to build firebird 3.0 on 
Debian/kfreebsd (that's Debian system with GNU userland and FreeBSD 
kernel).

The last such failure is at 
https://buildd.debian.org/status/fetch.php?pkg=firebird3.0&arch=kfreebsd-amd64&ver=3.0.0%7Esvn%2B61729.ds4-1&stamp=1433501687

The patch moves the platform-specific logic in a branch that is 
considered only when HAVE_QSORT_R is not defined (which I guess 
happens on WINNT, FREEBSD and DARWIN).

I haven't tested the patch on the above three systems. Could somebody 
with suitable development machine give it a try?


Thanks for considering,
dam

--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [patch] USE_QSORT_CTX on Debian/kFreeBSD

2015-06-05 Thread Damyan Ivanov
-=| Damyan Ivanov, 05.06.2015 12:04:09 + |=-
> Hi,
> 
> Attached is a patch that fixes failure to build firebird 3.0 on 
> Debian/kfreebsd (that's Debian system with GNU userland and FreeBSD 
> kernel).

Here's the patch itself.
Description: USE_QSORT_CTX on Debian/kFreeBSD
 If qsort_r is available, use it on all platforms. Use the platform-specific
 code otherwise.
 .
 Fixes a build failure on Debian/kFreeBSD which has qsort_r and defines
 FREEBSD, fooling the logic:
 https://buildd.debian.org/status/fetch.php?pkg=firebird3.0&arch=kfreebsd-amd64&ver=3.0.0~svn+61579.ds4-2&stamp=1433428041
Author: Damyan Ivanov 

--- a/src/jrd/recsrc/HashJoin.cpp
+++ b/src/jrd/recsrc/HashJoin.cpp
@@ -52,6 +52,7 @@ namespace
 	  qsort_compare_callback compare;
 	};
 
+#ifndef HAVE_QSORT_R
 #if defined(WIN_NT) || defined(DARWIN) || defined(FREEBSD)
 	int qsort_ctx_arg_swap(void* arg, const void* a1, const void* a2)
 	{
@@ -59,18 +60,16 @@ namespace
 	  return (ss->compare)(a1, a2, ss->arg);
 	}
 #endif
+#endif
 
 #define USE_QSORT_CTX
 
 	void qsort_ctx(void* base, size_t count, size_t width, qsort_compare_callback compare, void* arg)
 	{
-#if defined(LINUX)
 #ifdef HAVE_QSORT_R
 		qsort_r(base, count, width, compare, arg);
 #else
-#undef USE_QSORT_CTX
-#endif
-#elif defined(WIN_NT)
+#if defined(WIN_NT)
 		struct qsort_ctx_data tmp = {arg, compare};
 		qsort_s(base, count, width, &qsort_ctx_arg_swap, &tmp);
 #elif defined(DARWIN) || defined(FREEBSD)
@@ -79,6 +78,7 @@ namespace
 #else
 #undef USE_QSORT_CTX
 #endif
+#endif
 	}
 
 } // namespace
--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [FB-Tracker] Created: (CORE-4595) fbguard lock file created world-writable

2014-11-03 Thread Damyan Ivanov
-=| marius adrian popa, 03.11.2014 14:50:35 +0200 |=-
> Now is Patched in trunk and in B2_5_Release

Great, Thanks!

> On Sun, Nov 2, 2014 at 12:30 AM, Damyan Ivanov (JIRA) <
> trac...@firebirdsql.org> wrote:
> 
> > fbguard lock file created world-writable
> > 
> >
> >  Key: CORE-4595
> >  URL: http://tracker.firebirdsql.org/browse/CORE-4595
> >  Project: Firebird Core
> >   Issue Type: Bug
> >   Components: Guardian
> > Affects Versions: 2.5.3
> >  Environment: POSIX
> > Reporter: Damyan Ivanov
> > Priority: Minor
> >  Attachments: fb_guard-lock-permissions.patch
> >
> > fbguard creates its lock file with 0666 mode and  mask, resulting in a
> > file that is accessible and writable by all users of the system.

--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4595) fbguard lock file created world-writable

2014-11-01 Thread Damyan Ivanov (JIRA)
fbguard lock file created world-writable


 Key: CORE-4595
 URL: http://tracker.firebirdsql.org/browse/CORE-4595
 Project: Firebird Core
  Issue Type: Bug
  Components: Guardian
Affects Versions: 2.5.3
 Environment: POSIX
Reporter: Damyan Ivanov
Priority: Minor
 Attachments: fb_guard-lock-permissions.patch

fbguard creates its lock file with 0666 mode and  mask, resulting in a file 
that is accessible and writable by all users of the system.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] What is the status of IPv6 support in Firebird SQL for Windows

2014-09-01 Thread Damyan Ivanov
-=| Michal Kubecek, 01.09.2014 09:15:33 +0200 |=-
> On Tue, Jul 29, 2014 at 11:56:49AM +0300, Damyan Ivanov wrote:
> > -=| marius adrian popa, 29.07.2014 11:35:11 +0300 |=-
> > > Question is on Google + page
> > > 
> > > https://plus.google.com/b/111558763769231855886/+AchimKalwa/posts/8Pw5p9462Te?cfem=1
> > > 
> > > I  guess it's a lot simpler now to apply the patch if we drop support
> > > for windowsxp in firebird 3.x
> > 
> > In this line of thinking, has somebody looked into UNIX domain sockets 
> > implementation? (http://en.wikipedia.org/wiki/Unix_domain_socket) That 
> > could be used as a speed-up over communication via 127.0.0.1.
> 
> It's still on my ToDo list but I'm not going to start with this until
> the IPv6 support is complete and merged.

Thank you for your efforts.

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] dockerize Firebird ?

2014-08-20 Thread Damyan Ivanov
-=| Dimitry Sibiryakov, 20.08.2014 10:26:23 +0200 |=-
> 20.08.2014 10:22, marius adrian popa wrote:
> > is replaced with binary apt installs from wheezy
> >
> > We can work on a debian:jessie Dockerfile , it will be faster for
> > users to install instead of compiling Firebird
> 
>I'm sorry, but Firebird always was in Debian's apt depository in 
>binary form...

If you need the sources, they were always right there next to the 
binaries :)

http://http.debian.net/debian/pool/main/f/firebird2.5/

Look for "*.orig.tar.*", "*.debian.tar.*" and "*.dsc" files.

"apt-get source firebird2.5" downloads and expands the sources.


Cheers,
dam

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] What is the status of IPv6 support in Firebird SQL for Windows

2014-07-29 Thread Damyan Ivanov
-=| marius adrian popa, 29.07.2014 11:35:11 +0300 |=-
> Question is on Google + page
> 
> https://plus.google.com/b/111558763769231855886/+AchimKalwa/posts/8Pw5p9462Te?cfem=1
> 
> I  guess it's a lot simpler now to apply the patch if we drop support
> for windowsxp in firebird 3.x

In this line of thinking, has somebody looked into UNIX domain sockets 
implementation? (http://en.wikipedia.org/wiki/Unix_domain_socket) That 
could be used as a speed-up over communication via 127.0.0.1.

--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Fwd: ARM64 port

2014-04-28 Thread Damyan Ivanov
(Context: this is a reply to a thread from November 2013 about porting 
Firebird to 64-bit ARM)

-=| Alex Peshkoff, 29.11.2013 15:34:02 +0400 |=-
> I will apply a patch commented in opder to avoid conflicts with 
> class IDs.

Alex, thanks for adding this to the B2_5_Release branch. It seems it 
missed the actual prefix.linux_arm64 file. Please find it attached.

I also tried to add arm64 support to trunk so that the new 
implementation ID is recognised. The result is in the attached patch. 
It also adds implementation IDs for Alpha and HPPA which were missing 
in the public header file.

I hope you find this useful.


-- dam
# The contents of this file are subject to the Interbase Public
# License Version 1.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy
# of the License at http://www.Inprise.com/IPL.html
#
# Software distributed under the License is distributed on an
# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
# or implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code was created by Inprise Corporation
# and its predecessors. Portions created by Inprise Corporation are
# Copyright (C) Inprise Corporation.
#
# All Rights Reserved.
# Contributor(s): __.
# Start of file prefix.linux:  $(VERSION)  $(PLATFORM)
#  14 Apr 2008 Alan Barclayalan AT escribe.co.uk


#LD=@CXX@

#PROD_FLAGS=-ggdb -O3 -fno-omit-frame-pointer -DNDEBUG -DLINUX -pipe -MMD -fPIC
#DEV_FLAGS=-ggdb -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -p -fPIC -Wall -Wno-switch

PROD_FLAGS=-O3 -DNDEBUG -DLINUX -DARM64 -pipe -MMD -fPIC -fsigned-char 
-fmessage-length=0
DEV_FLAGS=-ggdb -DLINUX -DARM64 -pipe -MMD -fPIC -Wall -fsigned-char 
-fmessage-length=0

OS_ServerFiles=inet_server.cpp

EMBED_UTIL_TARGETS=gstat gds_relay gsec nbackup fb_lock_print fbguard fbsvcmgr 
fbtracemgr
CLIENT_UTIL_TARGETS=gstat gds_relay gsec nbackup fb_lock_print fbguard 
fbmgr_bin fbsvcmgr fbtracemgr

Physical_IO_Module=unix.cpp
>From d511e4a849712259925096a266228d4527bbc90a Mon Sep 17 00:00:00 2001
From: Damyan Ivanov 
Date: Mon, 28 Apr 2014 13:33:46 +
Subject: [PATCH] ARM4 support for trunk

---
 builds/posix/prefix.linux_arm64 | 27 +++
 configure.ac| 11 +++
 src/common/classes/DbImplementation.cpp | 28 +++-
 src/common/common.h |  4 
 src/jrd/inf_pub.h   |  3 +++
 5 files changed, 60 insertions(+), 13 deletions(-)
 create mode 100644 builds/posix/prefix.linux_arm64

diff --git a/builds/posix/prefix.linux_arm64 b/builds/posix/prefix.linux_arm64
new file mode 100644
index 000..a5a8755
--- /dev/null
+++ b/builds/posix/prefix.linux_arm64
@@ -0,0 +1,27 @@
+# The contents of this file are subject to the Interbase Public
+# License Version 1.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy
+# of the License at http://www.Inprise.com/IPL.html
+#
+# Software distributed under the License is distributed on an
+# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
+# or implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code was created by Inprise Corporation
+# and its predecessors. Portions created by Inprise Corporation are
+# Copyright (C) Inprise Corporation.
+#
+# All Rights Reserved.
+# Contributor(s): __.
+# Start of file prefix.linux:  $(VERSION)  $(PLATFORM)
+#  14 Apr 2008 Alan Barclayalan AT escribe.co.uk
+
+
+#LD=@CXX@
+
+#PROD_FLAGS=-ggdb -O3 -fno-omit-frame-pointer -DLINUX -pipe -MMD -fPIC
+#DEV_FLAGS=-ggdb -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -p -fPIC -Wall -Wno-switch
+
+PROD_FLAGS=-O3 -DLINUX -DARM64 -pipe -p -MMD -fPIC -fsigned-char -fmessage-length=0
+DEV_FLAGS=-ggdb -DLINUX -DARM64 -pipe -p -MMD -fPIC -Wall -fsigned-char -fmessage-length=0 -Wno-non-virtual-dtor
diff --git a/configure.ac b/configure.ac
index 931c82f..4c9cd5f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -239,6 +239,17 @@ dnl CPU_TYPE=ppc64
 STD_EDITLINE=true
 ;;
 
+  aarch64*-*-linux*)   // port was not tested
+MAKEFILE_PREFIX=linux_arm64
+INSTALL_PREFIX=linux
+PLATFORM=LINUX
+AC_DEFINE(LINUX, 1, [Define this if OS is Linux])
+EDITLINE_FLG=Y
+SHRLIB_EXT=so
+STD_EDITLINE=true
+STD_ICU=true
+;;
+
   sparc*-*-linux* | sparc*-*-gnu* | sparc*-*-k*bsd*-gnu)
 MAKEFILE_PREFIX=linux_sparc32
 INSTALL_PREFIX=linux
diff --git a/src/common/classes/DbImplementation.cpp b/src/common/classes/DbImplementation.cpp
index d554ab2..6152649 100644
--- a/src/common/classes/DbImplementation.cpp
+++ b/src/common/classes/DbImplementation.cpp
@@ -46,6 +46,7 @@ static const U

[Firebird-devel] [FB-Tracker] Created: (CORE-4397) Spelling errors in gpre switches and client messages

2014-04-22 Thread Damyan Ivanov (JIRA)
Spelling errors in gpre switches and client messages


 Key: CORE-4397
 URL: http://tracker.firebirdsql.org/browse/CORE-4397
 Project: Firebird Core
  Issue Type: Improvement
  Components: API / Client Library, GPRE
Affects Versions: 3.0 Alpha 2, 3.0 Alpha 1, 2.5.2 Update 1, 2.1.5 Update 1, 
2.5.2, 2.1.5, 2.5.1, 2.1.4, 2.5.0, 2.1.3, 2.1.2, 2.1.1, 2.1.0, 2.5.4
 Environment: any
Reporter: Damyan Ivanov
Priority: Trivial
 Attachments: spelling.patch

There are a couple of spelling mistakes in the built-in help about GPRE 
switches and in the error messages used by the client and the server.

'supress' should be 'suppress'
'priviledge' should be 'privilege'

Attached patch (against 2.5.2 update 1) fixes them.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] firebird2.5.2 and ICU 52.1

2013-12-13 Thread Damyan Ivanov
-=| Alex, 13.12.2013 16:49:35 +0400 |=-
> Your patch with great success causes first one - data may be 
> _silently_ (people useally do not read logs) lost when not found in 
> index. Performing backup without ICU version upgrade is already 
> possible, and letting people do some more things is making very bad 
> thing for them.

I see what you mean, and I admit I may be too patch-happy here.

In my defence I'll point out that I thought that I am forced with 
a day-long backup+restore cycle (× multiple databases). As it turns 
out, this is not the case.

On the bright side, I've learnt more about the ways Firebird uses ICU 
collations, so here's the recipe for recovering after "collation not 
installed" error after upgrading Firebird/ICU. In fbintl.conf, add 
your previous ICU version (4.8) to the list of icu_versions, after 
"default" and keep libicu48 package installed (my earlier statement 
that you can't have different icu versions installed at the same time 
was wrong). The result is that collation error is gone and you are 
free to do the backup+restore when convenient.

For all this to work, the ICU loading code has to support both 
4.8-style and 52-style library filenames, which I borrowed from the 
implementation in trunk. The end result is at 
http://anonscm.debian.org/gitweb/?p=pkg-firebird/2.5.git;a=blob;f=debian/patches/out/icu-version.patch

Thank you for your help, and sorry for being too eager to patch.


-- dam

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] firebird2.5.2 and ICU 52.1

2013-12-13 Thread Damyan Ivanov
-=| Alex, 13.12.2013 09:01:12 +0400 |=-
> On 12/13/2013 01:14 AM, Damyan Ivanov wrote:
> 
> > On a related note, I wonder if there is a way to convince firebird to
> > work with collations created with different (and no longer available)
> > version of ICU. This would minimise the efforts when upgrading ICU.
> 
> With no longer available version of ICU - no. How can one work with 
> missing software?

I called it a hack on purpose :)

Current patch is at 
http://anonscm.debian.org/gitweb/?p=pkg-firebird/2.5.git;a=blob;f=debian/patches/ignore-collation-version.patch

It ignores any collation version mismatches, replacing "COLLATION 
UNICODE_CI for CHARACTER SET UTF8 is not installed" error with 
a warning in the log ("Ignoring collation version mismatch. Wanted 
58.0.6.48 but will try to work with 58.0.6.50").

This gives me the freedom to decouple ICU upgrade from database 
backup+restore, at the expense of possible incorrect searches if the 
collation of the used characters has changed.

I realize this is not suitable for inclusion upstream, as it is too 
intrusive, replacing "give version X" with "give first available 
version". Perhaps it should fall back to the first available version 
only after examining all available ICU versions and/or if allowed via 
a configuration option.

> We had a plan to add something like
> RECREATE INTL INDICES
> command, but it's not ready yet.

This sounds like an excellent idea!


-- dam

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] firebird2.5.2 and ICU 52.1

2013-12-12 Thread Damyan Ivanov
-=| Alex Peshkoff, 12.12.2013 17:14:23 +0400 |=-
> On 12/12/13 14:10, Damyan Ivanov wrote:
> > --- a/src/jrd/unicode_util.cpp
> > +++ b/src/jrd/unicode_util.cpp
> > @@ -86,6 +86,11 @@ public:
> >   
> >  symbol.printf("%s_%d%d", name, majorVersion, minorVersion);
> >  module->findSymbol(symbol, ptr);
> > +   if (ptr)
> > +   return;
> > +
> > +   symbol.printf("%s_%d", name, majorVersion);
> > +   module->findSymbol(symbol, ptr);
> >  }
> >   
> >  int majorVersion;
> >
> > Symbols in 52.1 are named like:
> > u_init_52
> > uset_clone_52
> > ucase_totitle_52
> > etc.
> 
> Quite reasonable. In trunk we already have an array of patterns and a 
> loop on it to make it easier to add new rules. BTW, "%s_%d" is present 
> in both it and B2_5_Release.

Oh, right. Sorry for missing that commit.

On a related note, I wonder if there is a way to convince firebird to 
work with collations created with different (and no longer available) 
version of ICU. This would minimise the efforts when upgrading ICU.

Right now, one is required to backup all databases before upgrading, 
then restore them after upgrading. With big databases, this is very 
time consuming.

I imagine that a way (even a hack) that allows working with existing 
databases after upgrading ICU would make it possible to replace the 
backup+restore procedure with rebuilding of indices on columns with 
Unicode collations. Is this realistic at all?

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] firebird2.5.2 and ICU 52.1

2013-12-12 Thread Damyan Ivanov
-=| Alex Peshkoff, 12.12.2013 13:12:11 +0400 |=-
> On 12/12/13 13:01, Damyan Ivanov wrote:
> > -=| Damyan Ivanov, 12.12.2013 10:30:22 +0200 |=-
> >> (This is all on Debian unstable, firebird 2.5.2.26540 from the
> >> package)
> >>
> >>   $ isql-fb
> >>   Use CONNECT or CREATE DATABASE to specify a database
> >>   SQL> create database 'test.fdb';
> >>   SQL> create table xxx (name varchar(32) character set UTF8 collate 
> >> UNICODE);
> >>   Statement failed, SQLSTATE = 22021
> >>   unsuccessful metadata update
> >>   -XXX
> >>   -COLLATION UNICODE for CHARACTER SET UTF8 is not installed
> >>
> >> The problem appears also when restoring from backup and when opening
> >> a database which worked with firebird linked to ICU 4.8.1.1.
> >>
> >> fbintl.conf is not changed. (icu_versions = default)
> >> …
> >> My first idea was to patch the ucTemplate (and other *Template) to
> >> only use the MAJOR version component. I'll report back if this
> >> works, but there may be something else going on, given that these
> >> lookups aren't needed at all when linked with older ICU.
> > No luck. Patching avoids the lookups for libicuuc.521.so and there is
> > only one open of libicuuc.52.so at startup, but the error stays.
> >
> > Perhaps there are API changes that lead to missing entry points. I'll
> > try to verify that.
> 
> Can't help much - the max version I've dealt with is 51.2.

No problem!

What seems to help is attempting to also find symbols with only major 
version appended:

--- a/src/jrd/unicode_util.cpp
+++ b/src/jrd/unicode_util.cpp
@@ -86,6 +86,11 @@ public:
 
symbol.printf("%s_%d%d", name, majorVersion, minorVersion);
module->findSymbol(symbol, ptr);
+   if (ptr)
+   return;
+
+   symbol.printf("%s_%d", name, majorVersion);
+   module->findSymbol(symbol, ptr);
}
 
int majorVersion;

Symbols in 52.1 are named like:
u_init_52
uset_clone_52
ucase_totitle_52
etc.

Patching library filename doesn't seem to be needed at least for 
Debian, where there can't be multiple minor versions installed at the 
same time. Still, I may be able to get something nice for review, e.g. 
try libXXX.so.MAJORMINOR, then libXXX.so.MAJOR.MINOR

-- dam

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] firebird2.5.2 and ICU 52.1

2013-12-12 Thread Damyan Ivanov
-=| Damyan Ivanov, 12.12.2013 10:30:22 +0200 |=-
> (This is all on Debian unstable, firebird 2.5.2.26540 from the 
> package)
> 
>  $ isql-fb
>  Use CONNECT or CREATE DATABASE to specify a database
>  SQL> create database 'test.fdb';
>  SQL> create table xxx (name varchar(32) character set UTF8 collate UNICODE);
>  Statement failed, SQLSTATE = 22021
>  unsuccessful metadata update
>  -XXX
>  -COLLATION UNICODE for CHARACTER SET UTF8 is not installed
> 
> The problem appears also when restoring from backup and when opening 
> a database which worked with firebird linked to ICU 4.8.1.1.
> 
> fbintl.conf is not changed. (icu_versions = default)
> …
> My first idea was to patch the ucTemplate (and other *Template) to 
> only use the MAJOR version component. I'll report back if this 
> works, but there may be something else going on, given that these 
> lookups aren't needed at all when linked with older ICU.

No luck. Patching avoids the lookups for libicuuc.521.so and there is 
only one open of libicuuc.52.so at startup, but the error stays.

Perhaps there are API changes that lead to missing entry points. I'll 
try to verify that.

-- dam

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] firebird2.5.2 and ICU 52.1

2013-12-12 Thread Damyan Ivanov
(This is all on Debian unstable, firebird 2.5.2.26540 from the 
package)

It seems firebird is bitten again from changes in ICU.

When built (and linked) with ICU 52.1, Unicode collations don't work, 
similarly to CORE-3447:

 $ isql-fb
 Use CONNECT or CREATE DATABASE to specify a database
 SQL> create database 'test.fdb';
 SQL> create table xxx (name varchar(32) character set UTF8 collate UNICODE);
 Statement failed, SQLSTATE = 22021
 unsuccessful metadata update
 -XXX
 -COLLATION UNICODE for CHARACTER SET UTF8 is not installed

The problem appears also when restoring from backup and when opening 
a database which worked with firebird linked to ICU 4.8.1.1.

fbintl.conf is not changed. (icu_versions = default)

Tracing the process reveals that it is trying to load a library named 
"libicuuc.so.521.so", while in ICU 52.1 the library is named 
"libicuuc.so.52.1" with a symlink named "libicuuc.so.52" also 
available.

Comparing traces with the stable package (2.5.2.26540, but built with 
ICU 4.8.1.1), I noticed that it only opens libicuuc.so.48 in what 
seems to be the startup linkage resolution (the previous library 
opened is libc.so.6 and the next is libbsd.so.0). Later on there is no 
attempt to open libicuuc*.

When built with ICU 52.1 there is still an opening of libicuuc.so.52 
at startup, however, after doing some work with the database, there 
are attempts to open libicuuc.so.521.so, which fail.

My first idea was to patch the ucTemplate (and other *Template) to 
only use the MAJOR version component. I'll report back if this works, 
but there may be something else going on, given that these lookups 
aren't needed at all when linked with older ICU.


-- dam

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] firebird fails to build if "-Werror=format-security" flag is used.

2013-12-04 Thread Damyan Ivanov
-=| Philippe Makowski, 04.12.2013 19:32:30 +0100 |=-
> >From Fedora :
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1037062
> 
> In fact is is true, Mageia use  "-Werror=format-security" since a long
> time and to build Firebird package for Mageia I had to disable this (by
> chance I can using %define Werror_cflags %{nil} in the rpm spec file)
> but it is bad from the distro point of view.
> 
> and now the same problem arise for Fedora
> 
> Any volunteer to work on a patch ?

Already done. See 
http://patch-tracker.debian.org/patch/series/view/firebird2.5/2.5.2.26540.ds4-8/out/hardening.patch


Cheers,
dam

--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] make_all.bat - New API headers

2013-10-07 Thread Damyan Ivanov
-=| Adriano dos Santos Fernandes, 07.10.2013 07:47:08 -0300 |=-
> On 07/10/2013 05:59, Alex Peshkoff wrote:
> > On 10/07/13 05:05, Adriano dos Santos Fernandes wrote:
> >> Hi!
> >>
> >> make_all.bat has:
> >>
> >> :: New API headers
> >> copy %FB_ROOT_PATH%\src\include\firebird\*.h
> >> %FB_OUTPUT_DIR%\include\firebird > nul
> >>
> >> But it's not copying src\include\firebird\impl, necessary for external
> >> engines and messages.
> >>
> > Posix also does not copy them. Should it be copied or on posix boost is 
> > enough STD thing not to copy it in our packages?
> 
> It should be copied, of course.

Huh? Why?

Boost is available on every POSIX platform already, no?

What's next, ICU, libc6? (sarcasm)

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Fixing CORE-3996 for 2.5

2013-05-09 Thread Damyan Ivanov
-=| Damyan Ivanov, 09.05.2013 11:10:01 +0300 |=-
> http://tracker.firebirdsql.org/browse/CORE-3996 is flagged as fixed 
> for 2.5.3, but I can't see the commit in the B2_5_Release branch.

The attached patch (to be applied to B2_5_Release) seems to fix the 
crash for me.

-- dam
Description: fix a crash when creating a database outside of allowed paths
 firebird.conf/DatabaseAccess must be 'None' or 'Restricted'
Author: Damyan Ivanov 
Bug: http://tracker.firebirdsql.org/browse/CORE-3996

--- a/src/jrd/jrd.cpp
+++ b/src/jrd/jrd.cpp
@@ -1985,7 +1985,7 @@ ISC_STATUS GDS_CREATE_DATABASE(ISC_STATU
 	const VdnResult vdn = verifyDatabaseName(expanded_name, user_status, is_alias);
 	if (!is_alias && vdn == VDN_FAIL)
 	{
-		trace_failed_attach(NULL, filename, options, true, false);
+		trace_failed_attach(NULL, filename, options, true, user_status);
 		return user_status[1];
 	}
 
--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_mayFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Fixing CORE-3996 for 2.5

2013-05-09 Thread Damyan Ivanov
Hi,

http://tracker.firebirdsql.org/browse/CORE-3996 is flagged as fixed 
for 2.5.3, but I can't see the commit in the B2_5_Release branch.

Line 1988 of src/jrd/jrd.cpp still reads

 trace_failed_attach(NULL, filename, options, true, false);

Should that be changed to

 trace_failed_attach(NULL, filename, options, true, user_status);

instead?


-- dam

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] make install wrong under Debian Ubuntu 64

2013-01-10 Thread Damyan Ivanov
-=| Philippe Makowski, 10.01.2013 18:46:05 +0100 |=-
> working on the daily build and tests, I got a bug in 'make
> silent_install' under Debian Ubuntu 64
> 
> libraries have symlinks in /usr/lib64, but /usr/lib64 is the wrong place
> and don't normally exist under  Debian Ubuntu 64
> so when you do a 'make silent_install', ldconfig doesn't work
> 
> Damian, can you help ?
> 
> for now I solved it  by adding a  /etc/ld.so.conf.d/firebird.conf

Hmm. On Debian/Ubuntu configure is given a special --libdir option.

Strangely enough, this is so since version 2.5.1.26349-0 (2.5.1 RC1) 
and is due to adding support for multi-arch (ability to install 32-bit 
packages on 64-bit system) -- a novelty in Debian/Ubuntu.

Before that there was no --libdir option given to configure and it 
worked alright. Perhaps this is becayse the package build system 
doesn't use 'make install' but only '$(MAKE) -C gen -f 
Makefile.install buildRoot' and then hand-picks files from the 
resulting tree and dispatches them in different packages.

My guess is that 'make silent_install' needs to be taught to use the 
system library path, whatever that may be. Not sure of the exact 
details, autoconf is a small mystery to me, but perhaps @libdir@ needs 
to be plugged somewhere.

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Firebird 3, time to rename conflict names ?

2012-11-17 Thread Damyan Ivanov
-=| Philippe Makowski, 17.11.2012 10:48:19 +0100 |=-
> it could be then
> 
> fb-sql, fb-dump, fb-security, fb-fixup, fb-stat, fb-backup, fb-qli,
> fb-preprocess, fb-split,
> fb-qli
> 
> or
> 
> fb_sql, fb_dump, fb_security, fb_fixup, fb_stat, fb_backup, fb_qli,
> fb_preprocess, fb_split, fb_qli
> 
> 
> PS fbsql conflict with a Tcl interface to MySQL database
> and with one python module

I have run a quick find over all Debian packages. I looked for 
binaries prefixed with the different proposals.

 * fb- -- 0 matches
 * fb_ -- 0 matches outside firebird packages
 * fb  -- 18 matches outside firebird packages

Most of the fb* binaries are related to the fluxbox window manager. 
None of the present binaries conflicts with the proposed names above.

And finally, I'd give my preference to fb-* names, as underscore 
requires both hands to type on a standard qwerty keyboard (which is 
the only type I've ever seen). Everyone using a command line to work 
with firebird would be grateful for not using underscore :)

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Ubuntu builds

2012-11-14 Thread Damyan Ivanov
-=| Michal Kubecek, 14.11.2012 13:15:48 +0100 |=-
> On Wed, Nov 14, 2012 at 01:25:16PM +0200, Damyan Ivanov wrote:
> > 
> > The packaging is ready and anybody wanting to build the package can 
> > find the sources in the Git repository[1]. Since Debian is in a freeze 
> > preparing to its next release, I asked the release team for a freeze 
> > exception[2]. It would be great to have the final release in 
> > Debian/wheezy.
> ...
> > The current Debian package is a snapshot of 2.5.2. Here's the list of 
> > the changed things:
> 
> If the distribution contains ICU version >= 49 don't forget the fix for
> CORE-3946.

Latest ICU in Debian is 4.8.1.1. The fix for CORE-3946 will be 
included in a future 2.5.3 (snapshot?) package.

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Ubuntu builds

2012-11-14 Thread Damyan Ivanov
> Damyan started to sync the package , there is a already in git , i
> wait the final build and it will be pushed to ppa after that for the
> supported
> ubuntu releases

The packaging is ready and anybody wanting to build the package can 
find the sources in the Git repository[1]. Since Debian is in a freeze 
preparing to its next release, I asked the release team for a freeze 
exception[2]. It would be great to have the final release in 
Debian/wheezy.

[1] http://git.debian.org/?p=pkg-firebird/2.5.git;a=summary
[2] http://bugs.debian.org/693216

The current Debian package is a snapshot of 2.5.2. Here's the list of 
the changed things:

  * Official 2.5.2 release
+ CORE-3912: segfault in superclassic (Closes: #693192)
+ Restored the on-disk-structure compatibility with 2.5.1 index keys
  (Closes: #693193)
+ Fixed broken (working as no-op) sweep in SuperServer (Closes: #693195)
+ CORE-3902: Derived fields may not be optimized via an index
  (Closes: #693196)
+ CORE-3895: High memory usage when PSQL code SELECT's from stored
  procedure which modified some data (Closes: #693202)
+ CORE-3238: GEN_UUID returns a non-RFC-4122-compliant UUID
  (Closes: #693207)
+ CORE-3887: CHAR_TO_UUID and UUID_TO_CHAR works different in big endian
  architectures (Closes: #693209)
+ CORE-3884: Server crashes on preparing empty query when trace is
  enabled (Closes: #693210)
+ Enabled per-table runtime stats for sweeper
+ Changes not concerning Debian
  - CORE-3786: Hangs on MacOSX 10.7 (Lion) on DB create after reboot
  - CORE-3911: API entrypoints Bopen and BLOB_open are not visible on Darwin
  - CORE-3740: SELECT using IN list with >413 elements causes crash on Mac
(stack overflow with default stack size)
  - CORE-3740: optimisation bug in GCC on Darwin

  * Update debian/copyright (two new files, no licensing changes)
  * Add NEWS.Debian about incompatible fix in char↔UUID conversion functions

Cheers,
dam

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Design issue

2012-07-25 Thread Damyan Ivanov
-=| Dimitry Sibiryakov, 25.07.2012 21:46:44 +0200 |=-
> 25.07.2012 21:40, marius adrian popa wrote:
> > For CHAR(20) column, when using
> > UTF8 connection charset, sqllen is 80, and there is no way for
> > DBD::Firebird to determine that the column is really CHAR(20).
> 
>Actually, (sqlsubtype & 0xFF) will tell you that this is UTF8, so 
>you can easily find out length in chars dividing sqllen by 4.

Here's more about this in case somebody faces the same problem. From 
2.1 Release notes:

 sqlsubtype and Attachment Character Set

 When the character set of a CHAR or VARCHAR column is anything but 
 NONE or OCTETS and the attachment character set is not NONE, the 
 sqlsubtype member of an XSQLVAR pertaining to that column now 
 contains the attachment (connection) character set number instead of 
 the column's character set.

I guess this also means that in the above scenario the data put in the 
XSQLVAR is actually encoded in the character set given by sqlsubtype, 
transcoded if the origin column uses a different character set.

And the &0xff part is (as far as I can find) from 1.5.1 Release notes:

 (while talking about connection character set NONE being able to 
 read/write columns in any character set)
 Abstraction layers that have to manage this can read the low byte of 
 the sqlsubtype field in the XSQLVAR structure, which contains the 
 character set identifier.

Now, DBD::Firebird would only need to get the character set bytes per 
character (from rdb$character_sets.rdb$bytes_per_character) and act 
accordingly.

Thanks for the hints!

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [FBCLIENT] Difference between 2.1 and 2.5

2012-07-25 Thread Damyan Ivanov
-=| arnaud but, 25.07.2012 10:36:05 +0200 |=-
> DESCRIPTION :
> VARCHAR(22) CHARACTER SET NONE
> NOT NULL
> COLLATE NONE
> 
> ALTER TABLE MYTABLE ADD CONSTRAINT PK_MYTABLE PRIMARY KEY (MYID);
> 
> When i prepare an insert the sqltype for this column is 448 
> (base10).

Could it be that Firebird correctly reports the column as NOT NULL? 
You are free to override this and still supply NULL value, of course.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Building firebird for Android

2012-07-19 Thread Damyan Ivanov
-=| J-L M, 19.07.2012 10:57:53 +0200 |=-
> We are trying to compile Firebird 2.1
> for Android in order to use the embedded version in our mobile device
> of our software.
> But
> for the moment it seems impossible for some reasons : Android
> uses his own Libc called Bionic. And the problem is that there is a
> lot of missing features in. There is no implementation of the POSIX
> IPC or System V IPC inside, Android drop this to avoid
> denial-of-service. So, use of
> semaphore, shared memory, etc,  is not possible.

Perhaps you can try 2.5? It no longer uses semaphores.

Not sure about the availability of pthread mutexes in bionic, though.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Problem with Firebird 2.5 Debian Builds

2011-12-27 Thread Damyan Ivanov
-=| Alex Peshkoff, 27.12.2011 14:38:59 +0400 |=-
> Agreed - guardian directory (and probably some others) should be
> overridable by environment. On the other hand, overriding all
> directories like you suggest is bad idea - for a debian package it's
> meaningless to override bin or sbin, they should always point where
> actual binaries are placed.

For the package probably not (there are configure switches for this), 
but what about the user?

A user may want to use a Firebird instance completely isolated from 
the system-wide installation, including binaries, etc. One possible 
usage could be testing new versions or snapshots or bug fixes without 
disturbing the system-wide operations.

Thus I think that the possibility to override all configurable 
directories from the environment is a useful feature.

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Building the Debian Firebird 2.5.1 Package for Ubuntu 8.04 (Hardy)

2011-12-19 Thread Damyan Ivanov
-=| Tony Whyman, 19.12.2011 11:48:37 + |=-
> dpkg-shlibdeps: warning: symbol ucnv_fromUChars_3_8 used by
> debian/firebird2.5-server-common/usr/lib/firebird/2.5/plugins/libfbtrace.so
> found in none of the libraries.

My reading of this is that libfbtrace.so has an external symbol 
defined, but none of its linked libraries provides it. That's OK in 
reality, since fbtrace is loaded by the engine, and at that time ICU 
is already present in the process memory with all its symbols.

> Does anyone know if this is likely to cause a problem other than with
> the trace API (which is not used in the intended application).

Highly unlikely, I think, even if you use the trace API.

--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] second embedded connect hangs on armel, ia64, kfreebsd and s390

2011-12-08 Thread Damyan Ivanov
-=| Damyan Ivanov, 18.11.2011 21:27:26 +0200 |=-
> Maybe it's libedit interfering with libfbembed. I'll try the same 
> thing using the perl driver and see if strace will give any hints.

No luck.

I wrote a primitive isql-like tool that is able to create databases, 
connect to them and execute SQL statements.

Entering «create database 'test.fdb'» works if the tool is run from 
the prompt. If run under strace, there is a never-ending storm of
  rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
and the tool never finishes execution.

This makes me think that there is something that interferes with 
firebird's synchronization routines -- maybe in strace, maybe in the 
C library or even the kernel.

I wonder if anybody has ever used Firebird classic/embedded server on 
these architectures.

--
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-3687) gstat silently ignores host part of the connection string

2011-12-05 Thread Damyan Ivanov (JIRA)
gstat silently ignores host part of the connection string
-

 Key: CORE-3687
 URL: http://tracker.firebirdsql.org/browse/CORE-3687
 Project: Firebird Core
  Issue Type: Bug
  Components: GSTAT
Affects Versions: 2.5.1, 2.1.4, 3.0 Initial
 Environment: Tested on POSIX, but should be the same everywhere
Reporter: Damyan Ivanov
Priority: Minor


This is probably related to the fix of CORE-959 "GSTAT does not work using the 
localhost connection string".

Now gstat silently ignores any host part of the connection string, giving wrong 
impression that you can gather statistics from remote databases.

While ignoring "localhost:" and the local host name is handy, ignoring 
non-local host prefix is very confusing. An error should be thrown instead.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Firebird client package in Ubuntu 11.04

2011-12-02 Thread Damyan Ivanov
-=| Dimitry Sibiryakov, 02.12.2011 12:52:31 +0100 |=-
>I wonder: why libfbclient2 package has in dependencies ICU?
>I wanted to install client only, but had to download 7MB of needless crap.
> 

libfbclient depends on firebird2.5-common, which depends on ICU 
because if libfbintl. If the client doesn't need fbintl, then I guess 
I can move it in the -server-common package.


Damyan,
Maintainer of the firebird packages in Debian, from where Ubuntu 
takes them.

--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] second embedded connect hangs on armel, ia64, kfreebsd and s390

2011-11-18 Thread Damyan Ivanov
-=| Alex Peshkoff, 17.11.2011 13:28:00 +0400 |=-
>  On 11/17/11 11:37, Dmitry Yemanov wrote:
> > 17.11.2011 11:26, Alex Peshkoff wrote:
> >
> >> And one more interesting line:
> >> open("./fb_init", O_RDWR|O_CREAT|O_LARGEFILE, 0600) = 7
> >> Why is _SHARED_ file opened in CWD? It should go to /tmp/firebird.
> > Because he explicitly sets FIREBIRD_LOCK to CWD before running ISQL :-)
> 
> And do that isql-s have same or different CWD?

Exactly the same, running as the same user.

The same test works on e.g. amd64, so there is something, somewhere 
that is failing on the problem architectures.

Maybe it's libedit interfering with libfbembed. I'll try the same 
thing using the perl driver and see if strace will give any hints.

--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] second embedded connect hangs on armel, ia64, kfreebsd and s390

2011-11-16 Thread Damyan Ivanov
-=| Alex Peshkoff, 16.11.2011 10:28:52 +0400 |=-
> In standard install procedure empty, firebird group writable file
> firebird.log is created. Does .deb package create that file too?

Yes:

$ ls -l /var/log/firebird2.5.log
-rw-rw 1 firebird firebird 0 Nov 13 18:48 /var/log/firebird2.5.log

> Is user, running that script, a member of group firebird?

No and I can't make it. I am a mere user on the porter machines :)

> > The blocking process has been signaled (in the shared memory) but 
> > did not see that fact. This is likely to mean that the IPC event 
> > hasn't been delivered.
> 
> Starting with 2.5.1 all IPC-related errors, that can't be for some
> reason delivered to user, are not ignored but logged. Therefore making
> firebird.log work appears to be very good idea.

I am not sure. Running the connecting isql (the second one) under 
strace doesn't mention 'log' in the output. It also seems to loop 
repeating rt_sigprocmask calls, which makes me think there is 
something wrong with strace. (Same loop on the creating isql and the 
SQL> prompt doesn't show up after the creation).

Anyway, I can't find a way to let fbembed use another log directory, 
different from the one given to ./configure via --with-fblog. Perhaps 
I have missed something.

In case it helps, the output from 'strace isql-fb test.fdb' is at 
http://paste.ubuntu.com/740562/

--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] second embedded connect hangs on armel, ia64, kfreebsd and s390

2011-11-15 Thread Damyan Ivanov
-=| Dmitry Yemanov, 14.11.2011 23:42:53 +0400 |=-
> 14.11.2011 23:15, Damyan Ivanov wrote:
> 
> > # session 1
> > $ FIREBIRD=. FIREBIRD_LOCK=. isql-fb dbd-firebird-test.fdb
> > Database:  dbd-firebird-test.fdb
> > SQL>
> >
> > # session 2, from another terminal, running in the same working
> > # directory
> > FIREBIRD=. FIREBIRD_LOCK=. isql-fb dbd-firebird-test.fdb
> > # hangs
> 
> Do both terminals run with the same Linux user credentials?

Yes. The same setup works on several other architectures.

> Is there anything interesting in firebird.log?

There is no firebird.log file in the current directory. Perhaps 
I missed an additional environment variable that needs to be set for 
embedded (the system-wide firebird log directory is not writable by 
the user).

> > Attaching gdb to the second session's isql and requesting a backtrace
> > gives the following:
> 
> The second connection waits for the first one to downgrade its database 
> lock, but its request gets ignored.
> 
> A lock print output (with the -a switch) could be useful here.

Here it is. This is after (1) creating the database in the first 
session and (2) attempting to attach to the freshly created database 
in another session (same user, hanging).

$ FIREBIRD=. FIREBIRD_LOCK=. /usr/sbin/fb_lock_print -d test.fdb
LOCK_HEADER BLOCK
Version: 17, Active owner:  0, Length: 1048576, Used:  23896
Flags: 0x0001
Enqs: 79, Converts: 13, Rejects: 56, Blocks:  0
Deadlock scans:  0, Deadlocks:  0, Scan interval:  10
Acquires:237, Acquire blocks:  0, Spin count:   0
Mutex wait: 0.0%
Hash slots: 1009, Hash lengths (min/avg/max):0/   0/   3
Remove node:  0, Insert queue:  0, Insert prior:  0
Owners (2): forward:  20872, backward:  23672
Free owners: *empty*
Free locks: *empty*
Free requests: *empty*
Lock Ordering: Enabled

OWNER BLOCK  20872
Owner id: 73448235728900, type: 1, pending:  0
Process id:  17101 (Alive), thread id: 1073877248
Flags: 0x10   sgnl
Requests (21):  forward:  21040, backward:  23440
Blocks (1): forward:  21040, backward:  21040

OWNER BLOCK  23672
Owner id: 73761768341505, type: 1, pending:  23840
Process id:  17174 (Alive), thread id: 1073877248
Flags: 0x24 wait tout 
Requests (1):   forward:  23840, backward:  23840
Blocks: *empty*

Event log:
- end of output ---

If at this point the first isql is exited, it hangs and the lock table 
dump is:

LOCK_HEADER BLOCK
Version: 17, Active owner:  0, Length: 1048576, Used:  27144
Flags: 0x0001
Enqs:531, Converts: 16, Rejects:450, Blocks:  0
Deadlock scans:  0, Deadlocks:  0, Scan interval:  10
Acquires:   1521, Acquire blocks:  1, Spin count:   0
Mutex wait: 0.1%
Hash slots: 1009, Hash lengths (min/avg/max):0/   0/   3
Remove node:  0, Insert queue:  0, Insert prior:  0
Owners (1): forward:  23672, backward:  23672
Free owners (1):forward:  20872, backward:  20872
Free locks (2): forward:  21224, backward:  26840
Free requests (1):  forward:  26784, backward:  26784
Lock Ordering: Enabled

OWNER BLOCK  23672
Owner id: 73761768341505, type: 1, pending:  0
Process id:  17174 (Alive), thread id: 1073877248
Flags: 0x08   wake
Requests (47):  forward:  23840, backward:  27024
Blocks: *empty*

Event log:
DEL_OWNER:  owner =  20872, lock =  20872, request =  0
- end of output ---

Hopefully this gives some clues.

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] second embedded connect hangs on armel, ia64, kfreebsd and s390

2011-11-14 Thread Damyan Ivanov
This came from the test suite of the Perl Firebird driver, 
DBD::Firebird, but I am able to reproduce it with plain isql, so the 
problem seems to be somewhere else -- either Firebird or libc.

Firebird is 2.5.1.26351 from the Debian package, running on unstable. 
Embedded server.

The rest of DBD::Firebird test suite (not involving parallel 
connections) runs fine. On other architecture the whole test suite completes 
without errors.

At first I thought that the problem is in atomic-ops, whose 
substitution for hardware-based atomic operations using semaphores is 
buggy, but one of the failing architectures is ia64, and looking at 
the atomic-ops sources it seems there is a native implementation for 
ia64 :/

What is observed:

# session 1
$ FIREBIRD=. FIREBIRD_LOCK=. isql-fb dbd-firebird-test.fdb
Database:  dbd-firebird-test.fdb
SQL> 

# session 2, from another terminal, running in the same working 
# directory
FIREBIRD=. FIREBIRD_LOCK=. isql-fb dbd-firebird-test.fdb 
# hangs

Attaching gdb to the second session's isql and requesting a backtrace 
gives the following:

Thread 4 (Thread 0x42333450 (LWP 3876)):
#0  0x4065bc6c in __new_sem_wait (sem=)
at ../nptl/sysdeps/unix/sysv/linux/sem_wait.c:60
#1  0x40330444 in Firebird::SignalSafeSemaphore::enter (this=0x400341f8)
at ../src/common/classes/semaphore.cpp:95
#2  0x4007d51c in (anonymous namespace)::shutdownThread ()
at ../src/jrd/why.cpp:933
#3  0x40078f20 in run (this=)
at ../src/jrd/ThreadStart.cpp:128
#4  (anonymous namespace)::threadStart (arg=)
at ../src/jrd/ThreadStart.cpp:139
#5  0x40653ac0 in start_thread (arg=) at pthread_create.c:306
#6  0x4073602c in ?? ()
at ../ports/sysdeps/unix/sysv/linux/arm/nptl/../clone.S:113
   from /lib/arm-linux-gnueabi/libc.so.6
#7  0x4073602c in ?? ()
at ../ports/sysdeps/unix/sysv/linux/arm/nptl/../clone.S:113
   from /lib/arm-linux-gnueabi/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 3 (Thread 0x42e03450 (LWP 3877)):
#0  0x4065bf1c in sem_timedwait (sem=0x425e7078, abstime=0x42e02d78)
at ../nptl/sysdeps/unix/sysv/linux/sem_timedwait.c:88
#1  0x40330520 in Firebird::SignalSafeSemaphore::tryEnter (this=0x425e7078, 
seconds=, milliseconds=)
at ../src/common/classes/semaphore.cpp:132
#2  0x40240948 in Jrd::ConfigStorage::touchThreadFunc (this=0x425e36c8)
at ../src/jrd/trace/TraceConfigStorage.cpp:338
#3  0x402409f8 in Jrd::ConfigStorage::touchThread (arg=0x425e36c8)
at ../src/jrd/trace/TraceConfigStorage.cpp:321
#4  0x40078f20 in run (this=)
at ../src/jrd/ThreadStart.cpp:128
#5  (anonymous namespace)::threadStart (arg=)
at ../src/jrd/ThreadStart.cpp:139
#6  0x40653ac0 in start_thread (arg=) at pthread_create.c:306
#7  0x4073602c in ?? ()
at ../ports/sysdeps/unix/sysv/linux/arm/nptl/../clone.S:113
   from /lib/arm-linux-gnueabi/libc.so.6
#8  0x4073602c in ?? ()
at ../ports/sysdeps/unix/sysv/linux/arm/nptl/../clone.S:113
   from /lib/arm-linux-gnueabi/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 2 (Thread 0x4379c450 (LWP 3878)):
#0  __pthread_cond_wait (cond=0x42f9c750, mutex=)
at pthread_cond_wait.c:156
#1  0x40193200 in ISC_event_wait (event=0x42f9c730, value=, 
micro_seconds=0) at ../src/jrd/isc_sync.cpp:1290
#2  0x402bf2ac in Jrd::LockManager::blocking_action_thread (this=0x4002e778)
at ../src/lock/lock.cpp:1568
#3  0x402c3304 in Jrd::LockManager::blocking_action_thread (
arg=) at ../src/lock/../lock/lock_proto.h:402
#4  0x40078f20 in run (this=)
at ../src/jrd/ThreadStart.cpp:128
#5  (anonymous namespace)::threadStart (arg=)
at ../src/jrd/ThreadStart.cpp:139
#6  0x40653ac0 in start_thread (arg=) at pthread_create.c:306
#7  0x4073602c in ?? ()
at ../ports/sysdeps/unix/sysv/linux/arm/nptl/../clone.S:113
   from /lib/arm-linux-gnueabi/libc.so.6
#8  0x4073602c in ?? ()
at ../ports/sysdeps/unix/sysv/linux/arm/nptl/../clone.S:113
   from /lib/arm-linux-gnueabi/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0x40021100 (LWP 3875)):
#0  0x40659afc in __pthread_cond_timedwait (cond=0x42ea07f8, 
mutex=, abstime=0xbeeb78d8) at pthread_cond_timedwait.c:168
#1  0x401931d8 in ISC_event_wait (event=0x42ea07d8, value=, 
micro_seconds=100) at ../src/jrd/isc_sync.cpp:1270
#2  0x402c1568 in Jrd::LockManager::wait_for_request (this=0x4002e778, 
tdbb=0x4ec15ec2, request=, lck_wait=)
at ../src/lock/lock.cpp:3998
#3  0x402c1fe4 in Jrd::LockManager::grant_or_que (this=0x4002e778, 
tdbb=, request=0x42ea0830, lock=, 
lck_wait=-1) at ../src/lock/lock.cpp:2295
#4  0x402c22c8 in Jrd::LockManager::enqueue (this=0x4002e778, tdbb=0xbeeb8328, 
prior_request=, parent_request=, series=1, 
value=0x425fa874 "\001\376", length=16, type=4 '\004', ast_routine=
0x40127430 , ast_argument=0x426010c0, data=0, 
lck_wait=-1, owner_offset=22408) at ../src/lock/lock.cpp:566
#5  

Re: [Firebird-devel] 68K port

2011-10-24 Thread Damyan Ivanov
-=| Alex Peshkoff, 20.10.2011 16:40:04 +0400 |=-
>  Hi, Dam!
> 
> Can you comment something about this issue:
> http://tracker.firebirdsql.org/browse/CORE-3637
> 
> Telling true I'm surprised. Why is that port needed at all?

No idea. People need different things :)

> May be there is a real park of old 68k machines? Wikipedia mentions 
> that 68k-based architecture based CPUs are used in embedded systems, 
> but apache+php+firebird - is not it too much for embedded device?

The server probably is too much, although you never know what people 
would want to do. Having the client seems like a plausible goal, 
though.

> We had that port in FB1, but later cleaned it up. And I see no 
> reasons to return to it.

I'd suggest to not put too much effort into that or any other port. 
Let people interested in the port submit patches. I hope at least 
there is an implementation ID that is available for use?

> Did not drop as "Won't fix" only because it came from Debian :)

Very generous from you. Thanks!

As I understand it, the request is from a Debian/m68k porter, who aims 
at reaching high availability ratio for the port in order to make it 
"active" again (m68k was officially deprecate when the security 
support for Debian 3.1 (the last release with m68k) was stopped in 
March 2008).

Since so many "core" packages need Firebird to build (php5, qt, mono), 
they are trying to make Firebird available in order to not stop port 
progress to greater archive coverage. The other possible approach is 
to stop the depending core packages build their Firebird functionality 
and move on, but this is somewhat last resort.

I hope this brings some background and makes intentions clearer.

--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Segfault in libfbclient 2.5.1 RC1 when usilg alarm()

2011-09-20 Thread Damyan Ivanov
-=| Alex Peshkoff, 20.09.2011 14:17:54 +0400 |=-
>  On 09/20/11 14:08, Alex Peshkoff wrote:
> >  On 09/20/11 12:59, Damyan Ivanov wrote:
> >> perl alarm.pl db.fdb
> > Well, now I see
> > 20665817
> > on the screen. Must say that this is DEV_BUILD. I will try with release
> > one now.
> 
> With release build I confirm segfault.

Thanks!

Attached is a simple C program I wrote as an exercise which also 
segfaults. Sometimes after the first signal delivery, sometimes I have 
to wait several seconds.

This eliminates any side effects Perl of IBPerl may have and makes it 
a bit easier to debug, I hope.

Build with 'cc -Wall -lfbclient -o alarm alarm.c', run with './alarm 
database.fdb'.
#include "stdio.h"
#include "stdlib.h"
#include "ibase.h"
#include "string.h"
#include "signal.h"
#include "unistd.h"
#include "errno.h"

void errorcheck(const ISC_STATUS *status) {
if( status[0] == 1 && status[1] ) {
char buf[512] = "";
fprintf( stderr, "Firebird Error:\n" );
while ( fb_interpret(buf, sizeof(buf), &(status) ) ) {
fprintf( stderr, "  %s\n", buf );
}

exit(1);
}
}

void verbose(const char *msg) {
if (1) {
fprintf( stderr, "V: %s\n", msg );
fflush(stderr);
}
}

int flag;

void alrm(int signal) {
flag = 1;
alarm(1);
}

int main(int argc, char** argv) {
isc_db_handle   db = 0;
isc_tr_handle   tr = 0;
isc_stmt_handle st = 0;
ISC_STATUS  status[100];
XSQLDA  *osqlda;
int sqlda_size;
int num_fields;
short   *sqlind;
int i;
XSQLVAR *var;
int counter = 0;
struct sigaction   act;

if ( argc != 2 ) {
fprintf( stderr, "Usage: alarm \n" );
return(1);
}

verbose("Connecting");
isc_attach_database( status, 0, argv[1], &db, 0, NULL );
errorcheck(status);

verbose("Starting transaction");
isc_start_transaction( status, &tr, 1, &db, 0, NULL );
errorcheck(status);

verbose("Allocating statement");
isc_dsql_allocate_statement( status, &db, &st );
errorcheck(status);

osqlda = malloc(sizeof(XSQLDA));
memset(osqlda, '\0', sizeof(XSQLDA));
osqlda->version = SQLDA_VERSION1;

verbose("Prearing");
isc_dsql_prepare( status, &tr, &st, 0, "SELECT 1 FROM rdb$database", 3, osqlda);
errorcheck(status);

verbose("Describing");
isc_dsql_describe(status, &st, 3, osqlda);
errorcheck(status);

num_fields = osqlda->sqld;
sqlda_size = XSQLDA_LENGTH(num_fields);
osqlda = realloc(osqlda, sqlda_size);
osqlda->sqln = osqlda->sqld;

verbose("Re-describing");
isc_dsql_describe(status, &st, 3, osqlda);
errorcheck(status);

sqlind = malloc(osqlda->sqld * sizeof(short));

for( i = 0, var = osqlda->sqlvar; i < osqlda->sqld; i++, var++) {
int buf_len;
switch (var->sqltype & ~1) {
case SQL_SHORT:
case SQL_LONG:
buf_len = var->sqllen;
break;
default:
fprintf(stderr, "Unknown SQL type %d for output parameter %d\n", var->sqltype & ~1, i+1 );
exit(2);
}

var->sqldata = malloc(buf_len);
var->sqlind = &(sqlind[i]);
}

flag = 0;

act.sa_handler = alrm;
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
act.sa_restorer = NULL;

if( sigaction(SIGALRM, &act, NULL) != 0 ) {
fprintf(stderr, "Error %d setting alarm\n", errno);
exit(errno);
}

alarm(1);

while(1) {
isc_dsql_execute( status, &tr, &st, 3, NULL );
errorcheck(status);

isc_dsql_fetch( status, &st, 3, osqlda );
errorcheck(status);

isc_dsql_free_statement(status, &st, DSQL_close);
errorcheck(status);

counter++;

if (flag) {
printf("\r%d", counter);
fflush(stdout);
flag = 0;
}
}

// never reached

alarm(0);

verbose("Deallocating statement");
isc_dsql_free_statement(status, &st, DSQL_drop);
errorcheck(status);

verbose("Committing transaction");
isc_commit_transaction(status, &tr);
errorcheck(status);

verbose("Disconnecting");
isc_detach_database(status, &db);
errorcheck(status);

return(0);
}
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Segfault in libfbclient 2.5.1 RC1 when usilg alarm()

2011-09-20 Thread Damyan Ivanov
-=| Alex Peshkoff, 20.09.2011 12:32:22 +0400 |=-
> This does look like firebird bug. When isc_dsql_fetch() API call is
> used, user has no access to message internals.
> What is the best way to reproduce this bug?

Now this is a tough question :)

In case you're willing to build/install IBPerl, I have attached 
a short Perl script that repeatedly selects from rdb$database, while 
using alarm().

If you want to rule IBPerl out, then a C program is needed that does 
the same, and with that my help can be limited (although if you say 
I can try diving there).

IBPerl sources are available via anonymous subversion checkout:

 svn co http:/svn.openfmi.net/ibperl/trunk ibperl && cd ibperl

Then follow the usual Perl module installation procedure:

 perl Makefile.PL   # may have trouble finding Firebird, but should
# give instructions
 make
 sudo make install  # will install in /usr/local

The attached script, to be run as "perl alarm.pl db.fdb" reproduces 
the problem here. It can be used as an example for writing a similar 
program in C, I guess :)

Thank you for the quick response!

-- dam
#!/usr/bin/perl

use warnings;
use strict;
use IBPerl;

$| = 1; # flush STDOUT after each print

$ARGV[0] or die "Usage: alarm.pl \n";

my $db = IBPerl::Connection->new(Path => $ARGV[0]);
my $tr = IBPerl::Transaction->new( Database => $db );
my $st = IBPerl::Statement->new( Database => $db, Transaction => $tr, SQL => 'SELECT 1 FROM rdb$database' );

my $counter = 0;

sub status {
print "\r$counter";
}

$SIG{ALRM} = sub { status(); alarm(1) };
alarm(1);

while(1) {
$st->execute();
$st->fetch();
$st->close();
$counter++;
}

# code never reached
$tr->commit;
$db->disconnect;
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Segfault in libfbclient 2.5.1 RC1 when usilg alarm()

2011-09-20 Thread Damyan Ivanov
Hi,

I have a Perl script that used IBPerl for connecting to Firebird. The 
script is used for some mass data processing, and uses alarm() to 
provide feedback (prints number of processed input lines).

That same script used to work just fine until I upgraded the 
libfbclient2 to 2.5.1.26349-0 (RC1, from the Debian package). 
Downgrading the package to 2.5.0.26074-0 (2.5.0 final) makes the 
segfault go away.

It is perfectly possible that IBPerl is doing something bad, but since 
the script works with an older fbclient, I thought there could be 
a problem with the 2.5.1 RC1 version. The very same script works 
flawlessly if I drop the alarm() calls. All the SIGALRM catching is 
done via Perl signals, which are reliable, i.e. they are guaranteed 
not to interrupt syscalls etc.

Here is a backtrace and some poking at the variables:

Thread 2 (Thread 0x7539b700 (LWP 10073)):
#0  sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:86
#1  0x76aef238 in Firebird::SignalSafeSemaphore::enter 
(this=0x77fe6128) at ../src/common/classes/semaphore.cpp:95
#2  0x76ab08b9 in (anonymous namespace)::shutdownThread () at 
../src/jrd/why.cpp:933
#3  0x76aacf86 in run (this=) at 
../src/jrd/ThreadStart.cpp:128
#4  (anonymous namespace)::threadStart (arg=0x77fe5b38) at 
../src/jrd/ThreadStart.cpp:139
#5  0x77741b40 in start_thread (arg=) at 
pthread_create.c:304
#6  0x7748c36d in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x in ?? ()

Thread 1 (Thread 0x77fd1700 (LWP 10070)):
#0  __memcpy_sse2 () at ../sysdeps/x86_64/multiarch/../memcpy.S:78
#1  0x76ad3287 in REM_fetch (user_status=0x1581890, 
stmt_handle=, blr_length=, 
blr=0x77fdbef8 "\370\276\375\367\377\177", msg_type=0, msg_length=6, 
msg=0x77fdba78 "") at ../src/remote/interface.cpp:1905
#2  0x76ab50e9 in isc_dsql_fetch_m (user_status=, 
stmt_handle=, blr_length=12, 
blr=0x77fdba90 "\005\002\004", msg_type=0, msg_length=6, 
msg=0x77fdba78 "") at ../src/jrd/why.cpp:3256
#3  0x76ab52d4 in isc_dsql_fetch (user_status=, 
stmt_handle=0x1581888, dialect=3, sqlda=0x15f7ec0)
at ../src/jrd/why.cpp:3138
#4  0x76d6b70e in XS_IBPerl__Statement_IB_fetch (my_perl=, cv=) at IBPerl.xs:1473
#5  0x004dea07 in Perl_pp_entersub (my_perl=0x89d010) at pp_hot.c:2888
#6  0x004aa486 in Perl_runops_debug (my_perl=0x89d010) at dump.c:2049
#7  0x0044851e in S_run_body (oldscope=1, my_perl=0x89d010) at 
perl.c:2308
#8  perl_run (my_perl=0x89d010) at perl.c:2233
#9  0x004243f7 in main (argc=6, argv=0x7fffe128, 
env=0x7fffe160) at perlmain.c:117
(gdb) frame 1
#1  0x76ad3287 in REM_fetch (user_status=0x1581890, 
stmt_handle=, blr_length=, 
blr=0x77fdbef8 "\370\276\375\367\377\177", msg_type=0, msg_length=6, 
msg=0x77fdba78 "") at ../src/remote/interface.cpp:1905
1905memcpy(msg, message->msg_address, msg_length);
(gdb) p msg_length
$1 = 6
(gdb) p msg
$2 = (UCHAR *) 0x77fdba78 ""
(gdb) p message
$3 = (RMessage *) 0x77fdbef8
(gdb) p message->msg_address
$4 = (UCHAR *) 0x0

So it seems the msg_address member is 0 and memcpy rightfully throws 
a segmentation fault.

Does this ring any bells? Is there more information I could supply?


Thanks for your time,
dam

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] FB3 and python

2011-08-18 Thread Damyan Ivanov
-=| Alex Peshkoff, Thu, Aug 18, 2011 at 01:55:25PM +0400 |=-
>  Hi, who knows what was a reason to comment out following constants in
> consts_pub.h in trunk?
> 
> //#define isc_info_db_SQL_dialect   62
> //#define isc_dpb_SQL_dialect   63
> //#define isc_dpb_set_db_SQL_dialect65

That was revision 47451. "Comment unused items."

> Without isc_info_db_SQL_dialect kinterbasdb can't be installed:
> 
> gcc -pthread -fno-strict-aliasing -DNDEBUG -fPIC -UNDEBUG
> -I/usr/include/python2.6 -I/usr/include/python2.6 -c _kinterbasdb.c -o
> build/temp.linux-x86_64-2.6/_kinterbasdb.o -pedantic -g -std=c99
> -fno-strict-aliasing -pthread -O3
> In file included from _kinterbasdb.c:842:
> _kinterbasdb_constants.c: In function
> '_init_kidb_ibase_header_constants_database_info':
> _kinterbasdb_constants.c:267: error: 'isc_info_db_SQL_dialect' undeclared

The whole section is marked as deprecated since 1.5. Maybe kinterbasdb 
can switch to isc_dpb_sql_dialect? Strangely, that constant's value is 
63, not 62.

Maybe this gives some clues.

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [pkg-firebird-general] Bug#626931: FTBFS on GNU/Hurd

2011-05-16 Thread Damyan Ivanov
[Full CC for debiandevel]

-=| Damyan Ivanov, Mon, May 16, 2011 at 09:12:27PM +0300 |=-
> -=| Ondřej Surý, Mon, May 16, 2011 at 05:27:53PM +0200 |=-
> > Hi Marius,
> > 
> > On Mon, May 16, 2011 at 16:39, marius adrian popa  wrote:
> > > 2011/5/16 Ondřej Surý :
> > >> Package: firebird2.5
> > >> Version: 2.5.0.26074-0.ds4
> > >> Severity: normal
> > >> Tags: patch
> > >>
> > >> Firebird FTBFS on GNU/Hurd because MAXPATHLEN is not defined on that
> > >> platform.
> > >>
> > >> Attached is a patch which fixes that.  Please apply, it is a simple
> > >> fix and it blocks php5 build on GNU/Hurd.
> > >
> > > I have commited to svn 2.5 release branch
> > > please test if is ok
> 
> That was quick! :)
> 
> > Unfortunatelly I am not able to test it as I don't use hurd myself.
> 
> I asked the admin of strauss.debian.net (hurd porterbox) to install 
> the needed build dependencies for firebird2.5 and will try building it 
> there.
> 
> > But generally speaking (from my experience of fixing 
> > cyrus-imapd-2.x)
> > it should work. I am Ccing debian-hurd list, maybe somebody there
> > could help us with testing. If not I would suggest you go ahead and
> > upload if you have other stuff to release...
> 
> I seem to remember a Hurd porter said that there would be problems 
> with semaphores or something like that, but I can't find it. Anyway, 
> we'll see how the build goes on the porterbox. In the worst case php 
> would have to omit the firebird dependency/support for Hurd.

The build fails with the following error:

g++ -ggdb -O3 -DNDEBUG -DLINUX -pipe -MMD -fPIC -DFB_SEND_FLAGS=MSG_NOSIGNAL -I.
./src/include/gen -I../src/include -I../src/vulcan -DNAMESPACE=Vulcan -pthread -
g -O2   -DBOOT_BUILD  -fno-rtti -c ../src/jrd/gds.cpp -o ../temp/boot/jrd/gds.o
In file included from ../src/jrd/../jrd/../jrd/ThreadData.h:35,
 from ../src/jrd/../jrd/jrd.h:74,
 from ../src/jrd/gds.cpp:148:
../src/jrd/../jrd/../jrd/../common/classes/rwlock.h: In member function 'void Fi
rebird::RWLock::init()':
../src/jrd/../jrd/../jrd/../common/classes/rwlock.h:199: error: 'PTHREAD_RWLOCK_
PREFER_WRITER_NONRECURSIVE_NP' was not declared in this scope
../src/jrd/../jrd/../jrd/../common/classes/rwlock.h:199: error: 'pthread_rwlocka
ttr_setkind_np' was not declared in this scope
make[5]: *** [../temp/boot/jrd/gds.o] Error 1

Sending a copy to firebird-devel for oppinion.

--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Error building trunk (posix, SyncObject.h:65)

2011-05-13 Thread Damyan Ivanov
-=| Alex Peshkoff, Wed, May 11, 2011 at 12:23:04PM +0400 |=-
>  On 05/07/11 21:14, Damyan Ivanov wrote:
> > Seeing the fix in Svn, I have uploaded revision 52872 to Debian' 
> > build network. There are no changes regarding buildability on not 
> > that common architectures. Firebird 3.0 still builds only on 
> > 686/amd64. Build logs are available via the 'Last log' links on 
> > https://buildd.debian.org/status/package.php?p=firebird3.0&suite=experimental
> 
> Expected issue. Will be fixed soon. Now _really_ soon :-)

Okay, I keep watching :)
Thanks for your work!

--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] merged the following patches from debian 2.5

2011-05-13 Thread Damyan Ivanov
-=| marius adrian popa, Tue, May 10, 2011 at 01:35:00PM +0300 |=-
> I have merged the following patches
> 
> sparc-no-m32.patch
> powerpc-no-mcpu.patch
> 
> I review now the follwing that was needed for sh port
> atomic_ops_require_cas.patch
> 
> >From the list of patches
> http://git.debian.org/?p=pkg-firebird/2.5.git;a=tree;f=debian/patches;h=edad9438a0d331ca98e1c5fab9d5eaeae3722368;hb=experimental

Thanks! Lowering the difference bttween upstream and the package makes 
it less burden to maintain the package and hopefuly adds value to 
everybody tracking upstream.

> Some will not be merged like the fix_kfreebsd_amd64_miscompile.patch

I have dropped this as not necessary anymore.

> and others need more discussions (related to paths ...)

True. I am not sure how much changes would be acceptable for 2.5.x. Some 
of the patches left are quite invasive.

I am most interested in merging the rest of the patches[1] to the 3.0 
branch. I think all of them except deb/march-i486.patch can be merged 
upstream.

[1] http://git.debian.org/?p=pkg-firebird/3.0.git;a=tree;f=debian/patches

Thanks again!

--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Error building trunk (posix, SyncObject.h:65)

2011-05-07 Thread Damyan Ivanov
-=| Damyan Ivanov, Sat, Apr 30, 2011 at 05:40:12PM +0300 |=-
> -=| Alex Peshkoff, Fri, Apr 29, 2011 at 01:26:28PM +0400 |=-
> >  On 04/29/11 12:11, Damyan Ivanov wrote:
> > > Sorry if I am impatient :) I wanted to try the new synchronization 
> > > code on the Debian build daemons (3.0 so far supported only 
> > > x86/amd64).
> > 
> > Should build now - revision 52840.
> 
> Thanks! I went a but further, to revision 52857, and the build stops 
> at the invocation of build_file. There it sits waiting for a futex. 
> Backtrace attached.

Seeing the fix in Svn, I have uploaded revision 52872 to Debian' build 
network. There are no changes regarding buildability on not that 
common architectures. Firebird 3.0 still builds only on 686/amd64. Build 
logs are available via the 'Last log' links on 
https://buildd.debian.org/status/package.php?p=firebird3.0&suite=experimental

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Error building trunk (posix, SyncObject.h:65)

2011-04-30 Thread Damyan Ivanov
-=| Alex Peshkoff, Fri, Apr 29, 2011 at 01:26:28PM +0400 |=-
>  On 04/29/11 12:11, Damyan Ivanov wrote:
> > Sorry if I am impatient :) I wanted to try the new synchronization 
> > code on the Debian build daemons (3.0 so far supported only 
> > x86/amd64).
> 
> Should build now - revision 52840.

Thanks! I went a but further, to revision 52857, and the build stops 
at the invocation of build_file. There it sits waiting for a futex. 
Backtrace attached.


GNU gdb (GDB) 7.2-debian
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from 
/tmp/buildd/firebird3.0-3.0.0~svn+52857.ds3/gen/Release/firebird/bin/build_file...done.
Attaching to program: 
/tmp/buildd/firebird3.0-3.0.0~svn+52857.ds3/gen/Release/firebird/bin/build_file,
 process 3031
Reading symbols from 
/tmp/buildd/firebird3.0-3.0.0~svn+52857.ds3/gen/Release/firebird/lib/libfbclient.so.2...done.
Loaded symbols for 
/tmp/buildd/firebird3.0-3.0.0~svn+52857.ds3/gen/Release/firebird/lib/libfbclient.so.2
Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
[New Thread 0x2b7dc1784700 (LWP 3033)]
[New Thread 0x2b7dc1573700 (LWP 3032)]
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols 
found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from 
/tmp/buildd/firebird3.0-3.0.0~svn+52857.ds3/gen/Release/firebird/plugins/libEngine12.so...done.
Loaded symbols for 
/tmp/buildd/firebird3.0-3.0.0~svn+52857.ds3/gen/Release/firebird/plugins/libEngine12.so
Reading symbols from /usr/lib/libicuuc.so.44...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libicuuc.so.44
Reading symbols from /usr/lib/libicudata.so.44...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libicudata.so.44
Reading symbols from 
/tmp/buildd/firebird3.0-3.0.0~svn+52857.ds3/gen/Release/firebird/intl/libfbintl.so...done.
Loaded symbols for 
/tmp/buildd/firebird3.0-3.0.0~svn+52857.ds3/gen/Release/firebird/intl/libfbintl.so
Reading symbols from /lib/libnss_compat.so.2...(no debugging symbols 
found)...done.
Loaded symbols for /lib/libnss_compat.so.2
Reading symbols from /lib/libnsl.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libnss_nis.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libnss_nis.so.2
Reading symbols from /lib/libnss_files.so.2...(no debugging symbols 
found)...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from 
/tmp/buildd/firebird3.0-3.0.0~svn+52857.ds3/gen/Release/firebird/plugins/libfbtrace.so...done.
Loaded symbols for 
/tmp/buildd/firebird3.0-3.0.0~svn+52857.ds3/gen/Release/firebird/plugins/libfbtrace.so
0x2b7dc0be3be5 in pthread_join () from /lib/libpthread.so.0

Thread 3 (Thread 0x2b7dc1573700 (LWP 3032)):
#0  0x2b7dc0be9330 in sem_wait () from /lib/libpthread.so.0
No symbol table info available.
#1  0x2b7dc01e74d8 in Firebird::SignalSafeSemaphore::enter 
(this=0x2b7dc1365948) at 
/tmp/buildd/firebird3.0-3.0.0~svn+52857.ds3/src/common/classes/semaphore.cpp:95
No locals.
#2  0x2b7dc01a5ba5 in (anonymous namespace)::shutdownThread () at 
/tmp/buildd/firebird3.0-3.0.0~svn+52857.ds3/src/yvalve/why.cpp:472
No locals.
#3  0x2b7dc01cd03b in run (arg=0x2b7dc1365988) at 
/tmp/buildd/firebird3.0-3.0.0~svn+52857.ds3/src/common/ThreadStart.cpp:101
No locals.
#4  (anonymous namespace)::threadStart (arg=0x2b7dc1365988) at 
/tmp/buildd/firebird3.0-3.0.0~svn+52857.ds3/src/common/ThreadStart.cpp:116
thread = { = {_vptr.Synchronize = 
0x2b7dc042e230, shutdownInProgress = false, sleeping = false, wakeup = false}, 
threadId = 47819114624768, nextWaiting = 0x0, prevWaiting = 0x0, lockType = 
Firebird::SYNC_NONE, lockGranted = false, lockPending = 0x0, locks = 0x0, 
description = 0x2b7dc0201101 "threadStart"}
localArgs = {routine 

[Firebird-devel] Error building trunk (posix, SyncObject.h:65)

2011-04-29 Thread Damyan Ivanov
Hi,

Trying to build the latest trunk (revision 52838) fails.

With GCC 4.5.2:

g++ -ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DAMD64 -pipe -MMD -fPIC 
-fmessage-length=0 -O3 -fno-omit-frame-pointer  
-I/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/src/include/gen 
-I/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/src/include -pthread -fno-rtti -g 
-O2-c 
/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/src/common/ThreadStart.cpp -o 
/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/temp/Release/common/ThreadStart.o
In file included from 
/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/src/common/../common/classes/Synchronize.h:36:0,
 from 
/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/src/common/ThreadStart.cpp:51:
/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/src/common/../common/classes/../../common/classes/SyncObject.h:
 In constructor 'Firebird::SyncObject::SyncObject()':
/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/src/common/../common/classes/../../common/classes/SyncObject.h:65:13:
 error: no match for 'operator=' in 
'((Firebird::SyncObject*)this)->Firebird::SyncObject::waiters = 0'
/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/src/include/../common/classes/fb_atomic.h:487:1:
 note: candidate is: Firebird::AtomicCounter& 
Firebird::AtomicCounter::operator=(const Firebird::AtomicCounter&)
make[4]: *** 
[/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/temp/Release/common/ThreadStart.o] 
Error 1

With GCC 4.6.0:

g++-4.6 -ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DAMD64 -pipe -MMD -fPIC 
-fmessage-length=0 -O3 -fno-omit-frame-pointer  
-I/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/src/include/gen 
-I/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/src/include -pthread -fno-rtti -g 
-O2-c 
/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/src/common/ThreadStart.cpp -o 
/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/temp/Release/common/ThreadStart.o
In file included from 
/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/src/common/../common/classes/Synchronize.h:36:0,
 from 
/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/src/common/ThreadStart.cpp:51:
/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/src/common/../common/classes/../../common/classes/SyncObject.h:
 In constructor 'Firebird::SyncObject::SyncObject()':
/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/src/common/../common/classes/../../common/classes/SyncObject.h:65:13:
 error: no match for 'operator=' in 
'((Firebird::SyncObject*)this)->Firebird::SyncObject::waiters = 0'
/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/src/common/../common/classes/../../common/classes/SyncObject.h:65:13:
 note: candidate is:
/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/src/include/../common/classes/fb_atomic.h:486:7:
 note: Firebird::AtomicCounter& Firebird::AtomicCounter::operator=(const 
Firebird::AtomicCounter&)
/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/src/include/../common/classes/fb_atomic.h:486:7:
 note:   no known conversion for argument 1 from 'int' to 'const 
Firebird::AtomicCounter&'
make[4]: *** 
[/tmp/buildd/firebird3.0-3.0.0~svn+52838.ds3/temp/Release/common/ThreadStart.o] 
Error 1

Platform is Debian/amd64.

Sorry if I am impatient :) I wanted to try the new synchronization 
code on the Debian build daemons (3.0 so far supported only 
x86/amd64).

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Faster restore

2011-04-07 Thread Damyan Ivanov
-=| Adriano dos Santos Fernandes, Thu, Apr 07, 2011 at 12:07:37PM -0300 |=-
> PS: There is other restore improvement capable of take down time 
> from around 8.5s to 0.5s over TCP, but it still requires some 
> analisys.

Now *that* would be a killer gbak improvement! Can we have it for 
backup too? :)

--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel