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

dasdinit with -nnn (i.e. negative) size parameter creates a huge file #472

Closed
fbi-ranger opened this issue Feb 10, 2022 · 5 comments
Closed
Assignees
Labels
BUG The issue describes likely incorrect product functionality that likely needs corrected.

Comments

@fbi-ranger
Copy link

fbi-ranger commented Feb 10, 2022

FBA DASD 3370 has according to the specification 558000 sectors and 512 bytes per sector and result in an file with 272 MB size

$ dasdinit -lfs CMS19E.019E 3370 CMS19E
HHC02499I Hercules utility dasdinit - DASD image file creation program - version 4.4.1.10647-SDL-gd0ccfbc9-modified
HHC01414I (C) Copyright 1999-2022 by Roger Bowler, Jan Jaeger, and others
HHC01417I YBI-15301-10646
HHC01415I Build date: Jan 31 2022 at 16:10:41
HHC00463I 0:0000 CKD file CMS19E.019E: creating 3370 volume CMS19E: 558000 sectors, 512 bytes/sector
HHC00460I 0:0000 CKD file CMS19E.019E: 558000 sectors successfully written
HHC02423I DASD operation completed

Trying to create a DASD with smaller size is possible with specifying the sectors as parameter to dasdinit but doing so leads to a huge file:

$ dasdinit -lfs CMS19E.019E 3370 CMS19E -24000
HHC02499I Hercules utility dasdinit - DASD image file creation program - version 4.4.1.10647-SDL-gd0ccfbc9-modified
HHC01414I (C) Copyright 1999-2022 by Roger Bowler, Jan Jaeger, and others
HHC01417I YBI-15301-10646
HHC01415I Build date: Jan 31 2022 at 16:10:41
HHC00463I 0:0000 CKD file CMS19E.019E: creating 3370 volume CMS19E: 4294943296 sectors, 512 bytes/sector

Which I had to interrupt as it fills up the filesystem. Seems there is a bug in calculating the FBA size.

Small additional remark: HHC00463I should state that according to 3370 device type it allocates a FBA file and not an CKD.

@wrljet
Copy link
Member

wrljet commented Feb 10, 2022

-24000 is getting scanned as a negative value, which is then used as an unsigned value 4294943296.

Try it without the - sign.

@Fish-Git Fish-Git added BUG The issue describes likely incorrect product functionality that likely needs corrected. IN PROGRESS... I'm working on it! (Or someone else is!) labels Feb 10, 2022
@Fish-Git Fish-Git self-assigned this Feb 10, 2022
@Fish-Git
Copy link
Member

Hi Florian!

Thanks for reporting this! I'll try to get it fixed right away.

@Fish-Git
Copy link
Member

FYI:

HHC02499I Hercules utility ...... version 4.4.1.10647-SDL-gd0ccfbc9-modified

I happened to notice your reported version has "-modified" appended to it. I'm guessing this is probably because you did a ./autogen.sh before you did your ./configure and make.   Am I correct?

Presuming I am, I should inform you that autogen is no longer needed when building Hercules. The repository should always contain a valid pre-generated configure script that you can use directly to build Hercules with. There is no need to "generate" (via autogen.sh) a new configure script. The configure script that Hercules comes with should be good enough.

You will still always need to run configure of course. You will still need to do a ./configure ... before doing your make. That has not changed. But you do not need to do (and indeed should NOT do!) a separate ./autogen.sh beforehand.

When you build Hercules without doing an autogen, your version string should say just "4.4.1.10647-SDL-gd0ccfbc9" (i.e. without "-modified" appended), indicating your Hercules is a pristine, unmodified version of Hercules.

When we see someone using a "-modified" version of Hercules, we cannot be sure what they modified. We cannot be 100% sure they didn't make their own custom modifications to Hercules.

When the version is reported without the "-modified" string (as it should be), then we can be 100% sure the user is indeed running the version of Hercules that we think they are.

Does that make sense?

@Fish-Git Fish-Git changed the title dasdinit for FBA device 3370 with -size parameter creates huge file dasdinit with -size parameter (i.e. negative) creates a huge file Feb 10, 2022
@Fish-Git Fish-Git changed the title dasdinit with -size parameter (i.e. negative) creates a huge file dasdinit with -nnn (i.e. a negative) size parameter creates a huge file Feb 10, 2022
@Fish-Git Fish-Git changed the title dasdinit with -nnn (i.e. a negative) size parameter creates a huge file dasdinit with -nnn (i.e. negative) size parameter creates a huge file Feb 10, 2022
Fish-Git added a commit that referenced this issue Feb 10, 2022
@Fish-Git
Copy link
Member

Fixed by commit 1431f76.

Closing.

@Fish-Git Fish-Git removed the IN PROGRESS... I'm working on it! (Or someone else is!) label Feb 10, 2022
@fbi-ranger
Copy link
Author

fbi-ranger commented Feb 10, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG The issue describes likely incorrect product functionality that likely needs corrected.
Projects
None yet
Development

No branches or pull requests

3 participants