Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIG-11 when update is attempted on database with READ_ONLY flag through multiple global directories #253

Closed
nars1 opened this issue May 16, 2018 · 1 comment
Assignees
Milestone

Comments

@nars1
Copy link
Collaborator

nars1 commented May 16, 2018

Final Release Note

Description

Below is a test case illustrating the issue. This is an issue with YottaDB r1.20/r1.22 as well as GT.M V6.3-0003/V6.3-004.

> source test.csh
.
.
YDB>
%YDB-E-DBPRIVERR, No privilege for attempted update operation for file: /home/nars/wkshp_ydb/testarea/nars/test/temp/tmp/tmp/a.dat

YDB>
**%YDB-F-KILLBYSIGSINFO1, YottaDB process 26248 has been killed by a signal 11 at address 0x00007FA456397A61 (vaddr 0x00007FA4570E1008)
%YDB-F-SIGACCERR, Signal was caused by invalid permissions for mapped object
Segmentation fault (core dumped)**
> cat test.csh
rm -f a.dat x.dat mumps.dat
setenv ydb_gbldir x.gld
rm -f $ydb_gbldir
$ydb_dist/mumps -run GDE << GDE_EOF
change -segment DEFAULT -file=x.dat
add -name a -region=areg
add -region areg -dyn=aseg
add -segment aseg -file=a.dat
GDE_EOF

$ydb_dist/mupip create

setenv ydb_gbldir mumps.gld
rm -f $ydb_gbldir
$ydb_dist/mumps -run GDE << GDE_EOF
change -segment DEFAULT -file=mumps.dat
add -name a -region=areg
add -region areg -dyn=aseg
add -segment aseg -file=a.dat
GDE_EOF

$ydb_dist/mupip create -region=DEFAULT  # do not recreate AREG since it already exists

$ydb_dist/mupip set -read_only -nostats -acc=MM -reg AREG

$ydb_dist/mumps -direct << YDB_EOF
        set ^|"mumps.gld"|a=1
        set ^|"x.gld"|a=1
YDB_EOF

Draft Release Note

Attempts to update a database file which has the READ_ONLY flag set through multiple global directories that map some namespace into this database file correctly issues a DBPRIVERR error. In prior versions, any attempts to update the database file through a second global directory would abnormally terminate the process with a KILLBYSIGINFO1 error (SIG-11).

@nars1 nars1 added this to the r124 milestone May 16, 2018
@nars1 nars1 self-assigned this May 16, 2018
nars1 added a commit to nars1/YottaDB that referenced this issue May 17, 2018
…AD_ONLY flag through multiple global directories

The open of the same database file through the second global directory was not setting
reg->read_only to TRUE and that caused updates to the db file which go through this second
global directory to let the update proceed resulting in an out-of-design situation that
later manifests itself as a SIG-11.
nars1 added a commit to nars1/YottaDBtest that referenced this issue May 17, 2018
nars1 added a commit that referenced this issue May 17, 2018
… flag through multiple global directories

The open of the same database file through the second global directory was not setting
reg->read_only to TRUE and that caused updates to the db file which go through this second
global directory to let the update proceed resulting in an out-of-design situation that
later manifests itself as a SIG-11.
nars1 added a commit to YottaDB/YDBTest that referenced this issue May 17, 2018
@nars1 nars1 closed this as completed May 17, 2018
@ztmr
Copy link
Contributor

ztmr commented May 17, 2018

@nars1 @ksbhaskar great stuff, thank you for fixing this so quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants