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

core dump on finding a record in the callback of writing #6

Open
tangthth opened this issue Aug 24, 2018 · 0 comments
Open

core dump on finding a record in the callback of writing #6

tangthth opened this issue Aug 24, 2018 · 0 comments

Comments

@tangthth
Copy link

Issue Description:

Core dump occurs when finding a record in the callback of writing. The script aborted and core dump file generated, but no any error message reported.

Reproduce Step:

  1. write a nodejs script as below to write a record and in its callback find the record
  2. execute the script

Logs:

/u/usra/myscripts:>node test_vsam.js
Writing record done. Record key: 00001
/u/usra/myscripts:>ls -l
total 635968
-rw------- 1 USRA GRPA 162689280 Aug 23 10:00 coredump.01010453
-rw-r----- 1 USRA GRPA 192 Aug 10 06:37 schema.json
-rw-r----- 1 USRA GRPA 8286 Aug 23 10:00 test_vsam.js
/u/usra/myscripts:>file coredump.01010453
coredump.01010453: binary data
/u/tangth/myscripts:>file -i coredump.01010453
coredump.01010453: regular file

Reference:

vsamObj.write(recordx, function(err) {
	if (err !=null)	{
		console.log("Error in writing Record.  Record Key: " + recordx.key)
		console.error("The Error is: " + err)
	}
    else {
		console.log("Writing record done.  Record key: " + recordx.key)
				
		vsamObj.find(recordx.key, function(record,err) {		    
			console.log("Entering the callback of vsamObj.find().")
			if (err != null ) {
				console.log("Error in finding the record by key: " + recordx.key)
				console.error("The Error is: " + err)
			}	
			else {
				console.log("Found record key: " + record.key + ", record name: " + record.name + ", record gender: " + record.gender)		
			}				
		})
	}
}) 

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

No branches or pull requests

1 participant