Unknown field name 'SubmitOptions' after Perforce upgrade - perforce

I just migrated/upgraded from a Windows 2003 Perforce 2009.2 installation to a Windows 2008 R2 2010.2 box and noted that after the upgrade, the only issue that seems to present is the inability to create/edit workspaces from the UI - because it tries to set the SubmitOptions parameter and throws
Error at line 0 of field 'SubmitOptions' in client specification.
Unknown field name 'SubmitOptions'.
Yes, I'm able to create/edit client spec using p4 client, as long as I don't try to include the SubmitOptions parameter.
As far as I can tell, all aspects of the upgrade succeeded (p4d replacement, p4d -xu to upgrade the database, license in place, etc.)
Any ideas? Haven't found a whisper of this issue online (and my Google-fu is pretty good...)
Updates:
Output from p4 spec -o client (I've removed all comments)
# A Perforce Spec Specification.
Fields:
301 Client word 32 key
302 Update date 20 always
303 Access date 20 always
304 Owner word 32 optional
305 Host word 32 optional
306 Description text 128 optional
307 Root line 64 required
308 AltRoots llist 64 optional
309 Options line 64 optional
310 LineEnd select 12 optional
311 View wlist 64 optional
Words:
View 2
Formats:
Client 1 normal
Update 2 L
Access 4 L
Owner 3 R
Host 5 R
LineEnd 0 L
Values:
Options noallwrite/allwrite,noclobber/clobber,nocompress/compress,unlocked/locked,nomodtime/modtime,normdir/rmdir
LineEnd local/unix/mac/win/share

In the end, submitting the following additions to the client spec resolved the issue:
Fields:
313 SubmitOptions select 25 optional
314 Stream line 64 optional
Formats:
SubmitOptions 0 L
Values:
SubmitOptions submitunchanged/submitunchanged+reopen/revertunchanged/revertunchanged+reopen/leaveunchanged/leaveunchanged+reopen
I added those to the previous values and submitted the changes using the combination of
p4 configure set spec.custom=1
p4 spec -i client < fixedp4clientspec.txt
The first command was required because I received an error of "Custom spec of type 'client' is not allowed. Set spec.custom=1 to override." when I tried to update the spec without it. And I don't actually know that line 314 was needed to address this problem, but it was suggested when diffed against a spec that worked elsewhere.
Thanks for the assistance!

Related

How to fix "SemgrepError Error while running rules: 0 bytes read on a total of 2 expected bytes" error for SemGrep analyzer?

I am trying to integrate Gitlab SAST into my pipeline and facing the following error for SemGrep analyzer during generation of the report.
The error:
[DEBU] [Semgrep] [2022-10-11T10:02:55Z] [/go/src/buildapp/analyze.go:137] METRICS: Using configs from the Registry (like --config=p/ci) reports pseudonymous rule metrics to semgrep.dev.
To disable Registry rule metrics, use "--metrics=off".
Using configs only from local files (like --config=xyz.yml) does not enable metrics.
More information: https://semgrep.dev/docs/metrics
Scanning across multiple languages:
java | 86 rules × 37 files
js | 13 rules × 1 file
[INFO] [Semgrep] [2022-10-11T10:02:55Z] [/go/pkg/mod/gitlab.com/gitlab-org/security-products/analyzers/command#v1.9.1/run.go:179] Creating report
[DEBU] [Semgrep] [2022-10-11T10:02:55Z] [/go/src/buildapp/convert.go:25] Converting report with the root path: /path/to/my/repo
[FATA] [Semgrep] [2022-10-11T10:02:55Z] [/go/src/buildapp/main.go:27] tool notification error: SemgrepError Error while running rules: 0 bytes read on a total of 2 expected bytes
Any ideas where to look?
The change Gitlab runner to bigger one (cpu, ram) helped.

References do not appear in the PDF file of my book in Latex

I had compiled my work without any error in Latex a few months ago on a PC. However, it does work correctly on my new PC. My book.tex file looks like this:
\documentclass[graybox,envcountchap,sectrefs]{svmono}
\usepackage[sort, numbers]{natbib}
\usepackage{chapterbib}
%some packages are added
\begin{document}
\author{XYZ}
\title{abc}
\maketitle
\include{chapter1}
\include{chapter2}
\end{document}
My chapter1.tex and chapter2.tex look like the followings:
\chapter{Chapter one}
\cite[ref1]
\bibliographystyle{spbasic}
\bibliography{refCH1}
and
\chapter{Chapter two}
\cite[ref2]
\bibliographystyle{spbasic}
\bibliography{refCH2}
The refCH1.bib and refCH2.bib look like as:
#article{ref1,
title={ABC1},
author={AAA}
}
and
#article{ref2,
title={ABC2},
author={BBB}
}
The result of production pdf file, book.pdf, does not contain the references at the end of each chapter. Moreover, [?]’s appear instead of correct citations (e.g., [1], [2], …). The following messages appear in the console:
Command Line: makeindex.exe "book.idx"
Startup Folder: C:\...\SpringerBook\Springer_book_latex\templates
This is makeindex, version 2.15 [MiKTeX 2.9 64-bit] (kpathsea + Thai support).
Scanning input file book.idx...done (0 entries accepted, 0 rejected).
Nothing written in book.ind.
Transcript written in book.ilg.
Command Line: pdflatex.exe --interaction=errorstopmode --synctex=-1 "book.tex"
Startup Folder: C:\...\SpringerBook\Springer_book_latex\templates
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (MiKTeX 2.9 64-bit)
entering extended mode
(book.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 68 languages loaded.
(svmono.cls
Document Class: svmono 2009/12/17 v5.5
Springer Verlag global LaTeX document class for monographs
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
LaTeX Warning: Citation `ref1' in file `chapter1' on page 1 undefined on input line 20.
LaTeX Warning: Citation `ref2' in file `chapter2' on page 1 undefined on input line 20.
No file chapter1.bbl.
Command Line: bibtex.exe "book"
Startup Folder: C:\...\SpringerBook\Springer_book_latex\templates
This is BibTeX, Version 0.99d (MiKTeX 2.9 64-bit)
The top-level auxiliary file: book.aux
A level-1 auxiliary file: chapter1.aux
A level-1 auxiliary file: chapter2.aux
Illegal, another \bibstyle command---line 74 of file chapter1.aux
: \bibstyle
: {spbasic}
I'm skipping whatever remains of this command
Illegal, another \bibdata command---line 75 of file chapter2.aux
: \bibdata
: {refCH1}
I'm skipping whatever remains of this command
Database file #1: refCH1.bib
(There were # error messages)

Execute command with udev rule on loading driver

I have a touchscreen driver named "my_touch" which is loaded at boot because it's listed in /etc/modules. I want to write an Udev rule to change the line disciple after it is loaded by executing /usr/sbin/ldattach 25 /dev/ttymxc1. I've tried multiple udev rules, but they don't seem to work. I'm almost certain the rule has to look something like:
KERNEL=="my_touch", SUBSYSTEM=="module", ACTION=="add", RUN+="/usr/sbin/ldattach 25 /dev/ttymxc1"
Both the driver and device are available in sysfs.
$ udevadm info -ap /module/my_touch/
looking at device '/module/my_touch':
KERNEL=="my_touch"
SUBSYSTEM=="module"
DRIVER==""
ATTR{coresize}=="16384"
ATTR{initsize}=="0"
ATTR{initstate}=="live"
ATTR{refcnt}=="0"
ATTR{srcversion}=="45DFE5D135E9A5AFB61EB69"
ATTR{taint}=="O"
looking at parent device[..]
$ udevadm info -ap /devices/soc0/soc/2100000.aips-bus/21e8000.serial/tty/ttymxc1
looking at device '/devices/soc0/soc/2100000.aips-bus/21e8000.serial/tty/ttymxc1':
KERNEL=="ttymxc1"
SUBSYSTEM=="tty"
DRIVER==""
ATTR{close_delay}=="50"
ATTR{closing_wait}=="3000"
ATTR{custom_divisor}=="0"
ATTR{flags}=="0x10000000"
ATTR{io_type}=="2"
ATTR{iomem_base}=="0x21E8000"
ATTR{iomem_reg_shift}=="0"
ATTR{irq}=="68"
ATTR{line}=="1"
ATTR{port}=="0x0"
ATTR{type}=="62"
ATTR{uartclk}=="80000000"
ATTR{xmit_fifo_size}=="32"
looking at parent device[..]
If if test the rules, my rule does exist and no errors are shown.
$ udevadm test /module/my_touch/
calling: test
version 232
This program is for debugging only, it does not run any program
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.
=== trie on-disk ===
tool version: 232
file size: 8447619 bytes
header size 80 bytes
strings 1849043 bytes
nodes 6598496 bytes
Load module index
Found container virtualization none
timestamp of '/etc/systemd/network' changed
Parsed configuration file /lib/systemd/network/99-default.link
Created link configuration context.
timestamp of '/etc/udev/rules.d' changed
Reading rules file: [..]
rules contain 49152 bytes tokens (4096 * 12 bytes), 12709 bytes strings
4208 strings (39523 bytes), 3485 de-duplicated (27538 bytes), 724 trie nodes used
RUN '/usr/sbin/ldattach 25 /dev/ttymxc1' /etc/udev/rules.d/10-Prodrive.rules:2
ACTION=add
DEVPATH=/module/my_touch
SUBSYSTEM=module
USEC_INITIALIZED=1366176459
run: '/usr/sbin/ldattach 25 /dev/ttymxc1'
Unload module index
Unloaded link configuration context.
Clues to an appropriate udev rule and some explanation/reading is appreciated.
For the completeness of this thread; instead of using udev rules I've created a simple systemd unit file that executes every boot. Sadly, I couldn't get the udev rule to work.

FreeBSD pkg suddenly stopped bootstrapping

I've set up a packer template to generate vagrant base image of FreeBSD 10.3 and it was working well at least Mon Oct 3 00:34:41 2016 +0300.
Yesterday I was going to continue my work on this project and it turned out this is not working anymore. So here come details.
Packer does what it have to do, then runs my script to install FreeBSD by using bsdinstall(8) with the following script:
PARTITIONS="ada0 { 29G freebsd-ufs /, 5G freebsd-swap, 10G freebsd-ufs /var }"
DISTRIBUTIONS="base.txz kernel.txz"
#!/bin/sh
echo 'WITHOUT_X11="YES"' >> /etc/make.conf
echo 'OPTIONS_UNSET=X11' >> /etc/make.conf
echo 'nameserver 8.8.8.8' >> /etc/resolv.conf
cat >> /etc/rc.conf <<EOF
ifconfig_em0="DHCP"
sshd_enable="YES"
dumpdev="NO"
EOF
env ASSUME_ALWAYS_YES=1 pkg bootstrap # <<stops here
pkg update
pkg install -y sudo
[.....snip.....]
reboot
This stops at bootstrapping pkg with the message:
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:10:amd64/quarterly, please wait...
Signature for pkg not available.
pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:10:amd64/quarterly/Latest/pkg.txz.sig: Connection reset by peer
A pre-built version of pkg could not be found for your system.
Consider changing PACKAGESITE or installing it from ports: 'ports-mgmt/pkg'.
If I stop the bsdinstall script and chroot /mnt /bin/sh I can fetch pkg.txz.sig from the above URL without any problems.
Any ideas what could be the reason of the "connection reset by peer"? Something was changed on the pkg.FreeBSD.org recently?
I couldn't find anything about the issue.
UPD1
Looking at the captured traffic -- the site really answers 200OK and then drops the connection for the pkg.txz.sig file.
But this 200OK packet contains the signature file and they are identical for both manual fetch (which succeeds) and pkg bootstrap (which fails)
Both sessions are identical, so this is likely not a networking problem.
UPD2
The truss was not helpful either.
So as a workaround I've just modified my bsdinstall script to fetch files manually:
[.....snip.....]
#env ASSUME_ALWAYS_YES=1 pkg bootstrap
fetch http://pkg.FreeBSD.org/FreeBSD:10:amd64/quarterly/Latest/pkg.txz
fetch http://pkg.FreeBSD.org/FreeBSD:10:amd64/quarterly/Latest/pkg.txz.sig
pkg add pkg.txz
pkg update
[.....snip.....]
PS: The only thing that I can suspect now is the virtualbox version update... anyway downgrading is not an option. (ISO checksum is hardcoded into the template, the template and scripts are in git repository, so accidential changes are impossible)
UPD3
I've set up a debugging environment, for the moment I only isolated the function where the error is raised.
It's the second buffer refill from the http connection (while the first one has already read 727 bytes - it should be EOF)...
Here is small gdb log with backtrace and breakpoints to get there.
Added tcpdump capture made on the system (wireshark compatible).
As I found out, partially the problem was with pkg -- they try to read 10240 bytes from the connection, expecting the EOF if file will be smaller, but somehow on my system EOF is not set when whole remote file was already read out.
# /release/10.3.0/usr.sbin/pkg/pkg.c
185 char buf[10240];
242 while ((r = fread(buf, 1, sizeof(buf), remote)) > 0) {
and the following loops twice -- first time reading the file, second time getting connection reset error instead of EOF
# /release/10.3.0/lib/libc/stdio/fread.c
94 resid = count * size; # == 10240 here
100 while (resid > (r = fp->_r)) {
101 (void)memcpy((void *)p, (void *)fp->_p, (size_t)r);
102 fp->_p += r;
103 /* fp->_r = 0 ... done in __srefill */
104 p += r;
105 resid -= r;
106 if (__srefill(fp)) {
107 /* no more input: return partial result */
108 return ((total - resid) / size);
109 }
110 }
While manual fetch succeeds because the size is adjusted for small chunks and they only ask 727 bytes to read:
# /release/10.3.0/usr.bin/fetch/fetch.c
720 if (us.size != -1 && us.size - count < B_size &&
721 us.size - count >= 0)
722 size = us.size - count;
723 else
724 size = B_size;
733 if ((readcnt = fread(buf, 1, size, f)) < size) {
...but why EOF is not set is still a question.
Posted this to freebsd-pkg mailing list.
UPD1
Downgraded Virtualbox from 5.028 to 5.026 and EOF is set, _sread() on libc/stdio/refill.c:135 returns 0 and it sets EOF on line 138.
So something was changed in Virtualbox networking too. Added pcap file for Virtualbox 5.026 to the gist. 5.028 really was the culprit of connection reset - here is captures comparison.
Virtualbox 5.1.8 has this bug too. Version 5.1.6 works ok.
Opened ticket #16141 in their bugtracker.

Magento 2 Installation - Key must not exceed 56 bytes

I'm having issues installing Magento 2 via command line. When setup is running it gets to:
Module 'Magento_Indexer':
Running recurring..
And it throws an error:
[Magento\Framework\Exception\LocalizedException]
Key must not exceed 56 bytes.
I have searched around and couldn't find any clues as to what it can be. I thought the --key might be too long for Magento setup but I have tried the setup without --key, as it is optional but the error still occurs.
2016/07/08 14:42:49 [error] 30074#30074: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught exception 'Magento\Framework\Exception\LocalizedException' with message 'Key must not exceed 56 bytes.' in /magento/lib/internal/Magento/Framework/Encryption/Crypt.php:58
Stack trace:
0 /magento/lib/internal/Magento/Framework/Encryption/Encryptor.php(401): Magento\Framework\Encryption\Crypt->__construct('oon5eeRee7yiemo...', 'blowfish', 'ecb', false)
1 /magento/lib/internal/Magento/Framework/Encryption/Encryptor.php(313): Magento\Framework\Encryption\Encryptor->getCrypt('oon5eeRee7yiemo...', 0, false)
2 /magento/app/code/Magento/Config/Model/Config/Backend/Encrypted.php(107): Magento\Framework\Encryption\Encryptor->decrypt('PayPal')
3 /magento/lib/internal/Magento/Framework/App/Config/MetadataProcessor.php(86): Magento\Config\Model\Config\Backend\Encrypted->processValue('PayPal')
4 /magento/lib/internal/Magento/Framework/App/Config/Data.php(32): Magento\Framework\App\Config\MetadataPr" while reading response header from upstream, client: 127.0.0.1, server: www.magentotest.com, request: "GET /setup/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.magentotest.com"
If anyone could help that would be great, thank you!
app/etc/env.php is populated with the details of your installation. Look at the contents crypt, and make sure that key doesn't have multiple lines appended to it, as was the case in my new installation, after running the setup:install multiple times.
Changing this key for a current install would obviously be a bad idea. If this fixes you out, please let me know so I can log a ticket.

Resources