Reproducing in 21.4 as follows.
Inside `shell' run `bash-3.0-31'.
Run a background job inside it. Any interactive graphical program
will do, or even
perl -e 'use POSIX;pause;'&
Run a foreground job in `bash'. `cat' will do.
Terminate background job - by command in itself, or by `kill' from
another shell, so that `bash' outputs job status message.
`comint-interrupt-subjob' in shell buffer outputs an (elisp error)
message:
Wrong type argument: integer-or-marker-p, nil